Regression

Open In Colab

In Iteration 1, you trained a baseline regression model using:

  1. starter_dataset.xlsx with 80 molecules
  2. a simple train/test split
  3. default model parameters

Your goal in this notebook is to improve that baseline in a controlled way. We will change one thing at a time and track what happens to the performance metric.

Repeat what you did in the Classification notebook of this iteration.

And finally, as you did for classification, put all results together and reflect, the numbers can be different:

Step HOMO (MAE) LUMO (MAE)
starter_dataset.xlsx, simple train test split, default model parameters 0.140 0.154
xy_df, simple train test split, default model parameters 0.117 0.127
xy_df, 5-fold CV, default model parameters 0.100 ± 0.005 (5-fold CV) 0.125 ± 0.013 (5-fold CV)
xy_df, 5-fold CV, tuned model parameters 0.099 ± 0.005 (5-fold CV) 0.121 ± 0.014 (5-fold CV)

In Iteration 1, we trained separate models for HOMO and LUMO predictions. An alternative approach is to use a single model that predicts both simultaneously. For the next steps, it is up to you to decide which strategy to pursue. Make sure you can clearly justify your choice.

# IMPORT WHAT YOU NEED HERE

Step 1 — More data

# YOUR CODE HERE

Step 2 — Cross-validation

# YOUR CODE HERE

Step 3 — Hyperparameter tuning

# YOUR CODE HERE

Save your model(s) into the models folder.

# YOUR CODE HERE

# if you trained two models per target
homo_model_name = 'homo_iteration2.joblib'
lumo_model_name = 'lumo_iteration2.joblib'

# if you trained one model to predict both targets
model_name = 'homolumo_iteration2.joblib'