Lion Cipher Lab

Train a classifier with scikit-learn

Why it matters

Most people who touch AI only ever use a finished model. They never see the step that made it a model, which leaves the whole thing feeling like magic. It is not magic: a classifier is a function you fit to labeled examples and then test on examples it never saw. Training one yourself, end to end, in a few lines, is the fastest way to make AI stop being mysterious. It also teaches the discipline that separates people who trust models carefully from people who get burned: hold out a test set, read a confusion matrix instead of a single accuracy number, and know by name the ways a good-looking…

What you'll learn

Steps in this lab

  1. What it means to train a model
  2. Install scikit-learn, offline after this
  3. Load a built-in labeled dataset
  4. Split into train and test, and why
  5. Train a model and predict
  6. Evaluate: accuracy, confusion matrix, precision and recall
  7. The honest limits: overfitting, leakage, imbalance
  8. What you can now do that most people can't

Open the full interactive lab →