Lecture 21
Predictive modeling
Date: Dec 3, 2024
Learning objectives¶
After today, you should have a better understanding of:
- Define linear regression, its limitations, and objective function.
- Describe the purpose of loss functions in regression.
- Understand the conversion of data from a DataFrame to NumPy arrays.
- Develop hands-on programming skills for implementing regression in Python.
- Interpret the coefficients obtained through optimization and evaluate the model's performance.
- Visualize linear regression models and their fit to data.
- Discuss practical considerations for model interpretation, assumptions, and limitations.
Some relevant code snippets.
import numpy as np
import pandas as pd
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import Draw
import py3Dmol
def show_mol(smi, style="stick"):
mol = Chem.MolFromSmiles(smi)
mol = Chem.AddHs(mol)
AllChem.EmbedMolecule(mol)
AllChem.MMFFOptimizeMolecule(mol, maxIters=200)
mblock = Chem.MolToMolBlock(mol)
view = py3Dmol.view(width=500, height=500)
view.addModel(mblock, "mol")
view.setStyle({style: {}})
view.zoomTo()
view.show()