Machine Learning

The Machine Learning Workflow

Lesson 6 · Machine Learning

The Machine Learning Workflow

7 min

You'll be able to

  • Follow a complete ML project from data to deployment
  • Understand why evaluation happens on held-out data
  • Build a repeatable workflow for your own projects

A real ML project is a loop, not a single step. You gather data, explore and clean it, split it into training and test sets, train a model, evaluate it, then iterate. Only a well-performing model is worth deploying.

The loop

  • Define the problem and success metric.
  • Collect and clean data.
  • Split into train / validation / test.
  • Train candidate models.
  • Evaluate on data never seen during training.
  • Deploy, monitor, and iterate.
A minimal, correct train/test split
from sklearn.model_selection import train_test_split

X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.2, random_state=42
)
# never evaluate on data the model trained on

Challenge

Plan a project

Sketch the five-step workflow you would follow to build a model that predicts whether a loan applicant defaults.

Knowledge Check

ML workflow

0/2 answered

You should evaluate your final model on the same data it was trained on.

The correct order of a typical ML project is:

Answer all questions to submit.

Search AmineX

Search courses, lessons, projects and concepts