# IMPORT WHAT YOU NEED HERERegression
In Iteration 1, you trained a baseline regression model using:
starter_dataset.xlsxwith 80 molecules- a simple train/test split
- 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.
- Load
xy_df_hopv.csvintoxy_df - Train the model with
xy_df, the same way you trained the model in Iteration 1. - Add cross validation, exactly as you did for classification.
- Tune the model, exactly as you did for classification.
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.
Step 1 — More data
# YOUR CODE HEREStep 2 — Cross-validation
# YOUR CODE HEREStep 3 — Hyperparameter tuning
# YOUR CODE HERESave 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'