Model Creation using Data Science Notebook
This section aims to step down the process of creating, saving, and loading a Data Science model using the notebook infrastructure provided inside the Data Science Lab module.
Last updated
This section aims to step down the process of creating, saving, and loading a Data Science model using the notebook infrastructure provided inside the Data Science Lab module.
Last updated
Once the Notebook script is executed successfully, the users can save them as a model. The saved model can be loaded into the Notebook.
Check out the illustration on saving and loading a Data Science Model.
Navigate to a Data Science Notebook.
Write code using the following sequence:
Read DataFrame
Define test and train data
Create a model
Execute the script by running the code cell.
Get a new cell.
Click the Save model option.
A code gets generated in the newly added code cell.
Give a model name to specify the model and model type as ml.
Execute the code cell.
After the code gets executed, the Model gets saved under the Models tab.
Please Note: The newly saved model gets saved under the unregistered category inside the Models tab.
model - Trained model variable name.
modelName - The desired name given by the user for the trained model.
modelType - Type in which model can be saved.
X - This array contains the input features or predictors used to train the model. Each row in the X_train array represents a sample or observation in the training set, and each column represents a feature or variable.
Y - This array contains the corresponding output or response variable for each sample in the training set. It is also called the target variable, dependent variable, or label. The Y_train array has the same number of rows as the X_train array.
estimator_type - The estimator_type of a data science model refers to the type of estimator used.
Open the Models tab.
Access the Unregistered category.
The saved model will be available under the Models tab. Please select the model by using the given checkbox to load it.
The model gets loaded into a new cell.
Run the cell.
A saved model under the Model tab of the Data Science Notebook gets the following options: