Skip to main content
Albero Academy

The ML Workflow

The end-to-end path from raw data to a deployed model.

Foundations9 min

Machine learning isn't just calling fit — it's a repeatable workflow. Knowing the steps (and their order) keeps you from the classic mistakes, like testing on data you trained on.

The steps

  • 1. Frame the problem — regression? classification? what's the target?
  • 2. Get & split data — train/test split before anything else.
  • 3. Explore & preprocess — clean, scale, encode (fit on train only).
  • 4. Train — fit a model on the training set.
  • 5. Evaluate — score on the held-out test set with the right metric.
  • 6. Tune — cross-validate and search hyperparameters.
  • 7. Deploy — persist the model and use it on new data.

The cardinal rule

Key takeaways

  1. 01ML is a workflow: frame → split → preprocess → train → evaluate → tune → deploy.
  2. 02Split into train/test before any preprocessing or exploration of the target.
  3. 03Fit transformations on training data only, then apply to test.
  4. 04Letting test data influence training is data leakage — it inflates scores and breaks in production.

Finished this chapter?

Mark it complete to track your progress through Scikit-learn.