Before class:¶

  1. Open scikit-learn.org in a browser tab (you'll want to be able to search for function docs today)
  2. Add this to the top of your code (to the imports area)
from sklearn import set_config
set_config(display="diagram")  # display='text' is the default

Now, anytime you run a cell block where the last line is a pipeline object, it will "print" it (like always), but now it will display as a picture! (Requires scikit-learn 1.0+)

Hello!¶

Today:¶

  1. You can still take notes in ML/readme .md
  2. Finishing ML_worksheet1.ipynb
    • Last class: ColumnTransformer and pipelines, fit and predict
    • Today: cross_validate and gridsearch_cv
  3. ML_worksheet2.ipynb: Classification models
    • How to evaluate them
    • Fixing our bad model
    • Thinking about the objective: what to maximize and/or minimize in your model