In [1]:
from dsc80_utils import *
import lec16_util as util
Announcements 📣¶
- Lab 8 is due on Wednesday.
- Final Project Checkpoint 2 is due Friday.
- The Final Exam is on Saturday, June 8 from 8-11AM (room TBD).
- You can bring two double-sided notes sheets (you can bring your midterm notes sheet, if you want).
- More details to come.
Agenda 📆¶
- Hyperparameters.
- Cross-validation.
- Decision trees.
Question 🤔 (Answer at q.dsc80.com)
Remember, you can always ask questions at q.dsc80.com!
Review: Hyperparameters¶
In [2]:
np.random.seed(23) # For reproducibility.
def sample_from_pop(n=100):
x = np.linspace(-2, 3, n)
y = x ** 3 + (np.random.normal(0, 3, size=n))
return pd.DataFrame({'x': x, 'y': y})
sample_1 = sample_from_pop()
sample_2 = sample_from_pop()
In [3]:
px.scatter(sample_1, x='x', y='y', title='Sample 1')