Machine Learning (ML) · Beginner level

Beginner level · Module 3 of 5 · 10 guided hours

First Models: Regression and Classification

Train and interpret linear regression, logistic regression, k-nearest neighbours and decision trees.

Learning objectives

  • Train and interpret a linear regression model
  • Train classification models with logistic regression and k-nearest neighbours
  • Train and read a decision tree

Topics

  • linear regression and coefficients
  • baselines
  • logistic regression and probabilities
  • k-nearest neighbours and scaling
  • decision trees
  • comparing simple models

Lessons

  1. Lesson 1 Linear Regression

    Predict a number with a straight-line model and read what its coefficients say.

    linear regressioncoefficient and interceptbaselineresidual

  2. Lesson 2 Classification: Logistic Regression and k-Nearest Neighbours

    Predict categories with logistic regression and k-nearest neighbours, and see why feature scaling matters.

    logistic regressionpredicted probabilityk-nearest neighboursfeature scaling

  3. Lesson 3 Decision Trees

    Train decision trees, read their rules and see how depth controls the risk of memorising the data.

    decision treesplit and leafmax_depthinterpretability

Practical activity

Train three classifiers on the dropout data and a regression model on a crop-yield data set, comparing each with a simple baseline.

Expected outcomes

  • Working regression and classification models
  • Understanding of how each algorithm decides

Assessment

Practical: train and compare models on a provided data set; marked on correct use of the API, baselines and interpretation.

Free taster lesson Key ML Algorithms & When to Use Them Read a free self-study lesson on this topic in the Free Course Library.

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.