Models

Saving & loading a Data Science Lab model

Once the Notebook script is executed successfully, the users can save them as a model. The saved model can be loaded into the Notebook.

Saving a Data Science Lab Model

  • Navigate to a 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 given inside the Models tab.

Function Parameters

  • model - Trained model variable name.

  • modelName - Desired name given by 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 use.

Loading a Data Science Lab Model

  • Open the Models tab.

  • Access the Unregistered category.

  • The saved model will be available under the Models tab. Select the model by using the given checkbox to load it.

  • The model gets loaded into a new cell.

  • Run the cell.

Please Note: Refer the Data Science Lab Quick Start Flow page to get an overview of the Data Science Lab module in nutshell.

Last updated