Train the Model

This topic shows you how to run experiments and develop a model using the file.

The script tracks metrics, mean squared error (MSE) and R2, to help compare the results of different experiments. It also writes the fitted model to a model.pkl file.

  1. Navigate to the Iris project's Overview > Experiments page.
  2. Click Run Experiment.
  3. Fill out the form as follows and click Start Run. Make sure you use the Python 3 kernel.

  4. The new experiment should now show up on the Experiments table. Click on the Run ID to go to the experiment's Overview page. The Build and Session tabs display realtime progress as the experiment builds and executes.
  5. Once the experiment has completed successfully, go back to its Overview page. The tracked metrics show us that our test set had an MSE of ~0.0078 and an R2 of ~0.0493. For the purpose of this demo, let's consider this an accurate enough model to deploy and use for predictions.

  6. Once you have finished training and comparing metrics from different experiments, go to the experiment that generated the best model. From the experiment's Overview page, select the model.pkl file and click Add to Project.
    This saves the model to the project filesystem, available on the project's Files page. We will now deploy this model as a REST API that can serve predictions.