All courses Machine learning

Machine Learning Basics: Build Your First Prediction Model

Beginner

Train, measure and explain a scikit-learn model that predicts which customers will leave.

Beginner 12 lessons 38 lab exercises Certificate Updated

You build

A small Python project that trains a model on a sample table of phone company customers to predict which customers will leave, measures it once on customers it never saw, and reports in plain words what its predictions rely on.

You need

  • Basic Python: variables, functions, lists, dictionaries, loops, importing a module and running a script from a terminal
  • School math: percentages, averages and reading a small table of numbers (no calculus, no statistics course)

To build it on your own machine

This is optional and comes with a plan. The course pack brings the starting files, a ready container and a check for every lesson. You need only Docker and git, plus your own AI coding agent if you want a tutor.

What you learn

A model is worth what it scores on data it never saw

You build one model from the first lesson to the last: it reads a sample table of 7,043 phone company customers, published by IBM, and predicts who will leave. Each lesson adds one working step: split the data, train a first decision tree, measure it with more than accuracy, catch it memorising, cross-validate, add logistic regression, prepare text and blank values in a pipeline, try gradient boosting, test once and explain it. You need basic Python; the few pandas calls used are explained as they appear.

  • Honest Measurement. A test set that stays locked until the end, a baseline every model must beat, precision and recall where accuracy flatters, and cross-validation with its spread so that a lucky split never decides.
  • Models You Can Read. A decision tree as a short list of yes-or-no questions and logistic regression as a weighted sum turned into a probability: two simple models you can inspect, both trained with the same fit and predict.
  • Overfitting. How a model that is allowed to grow memorises its training rows, how the gap between its training and validation scores gives it away, and how a setting is chosen without fooling yourself.
  • Features and Stronger Models. Turning text categories and blank values into numbers inside a pipeline, how gradient boosting builds many small trees one after another, why a more powerful model does not always win, and how to choose when two models tie.

Lessons

Where it fits

Course 1 of 2 on the Machine Learning Engineer path.

How our courses are made Report a mistake