Run experiments using fit.py
to develop a model. The
fit.py
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.
-
Navigate to the Iris project's page.
-
Click Run Experiment.
-
Fill out the form as follows and click Start Run. Make sure you
use the Python 3 kernel.
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.
-
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.
-
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.