Add more documentation

This commit is contained in:
Jason Jafari 2024-06-16 21:11:10 -04:00
parent 25e41556b9
commit 07f7b8acf1

View File

@ -230,9 +230,16 @@ def add_constant_columnTransformer(df):
df_with_const.insert(0, 'const', 1) df_with_const.insert(0, 'const', 1)
return df_with_const return df_with_const
from mlModelSaver import MlModelSaver
mlModelSaverInstance = MlModelSaver({
"baseRelativePath": "..",
"modelsFolder": "models"
})
# Export the model using MlModelSaver # Export the model using MlModelSaver
loadedModel = mlModelSaverInstance.exportModel( loadedModel = mlModelSaverInstance.exportModel(
simpleLinearRegressionFittedModel, # the models is fitted and ready for usage # the models is fitted and ready for usage
simpleLinearRegressionFittedModel,
{ {
"modelName": "modelPredictSaleByTemperatureAdvertisingDiscountFit", "modelName": "modelPredictSaleByTemperatureAdvertisingDiscountFit",
"description": "Example model predicting sales based on temperature, advertising, and discount.", "description": "Example model predicting sales based on temperature, advertising, and discount.",