Bit by Bit
← All courses
Machine Learning · Intermediate

Classification

Sort things into categories: spam or not, disease or healthy, cat, dog or bird. Turn scores into probabilities, write a nearest-neighbour classifier yourself, and see how decision trees ask a chain of yes-or-no questions.

4 lessons28 minutesFree
Start this course →

Lessons

  1. 1Predicting categoriesTell binary from multiclass problems, and see a classifier as a map.6 min
  2. 2From scores to probabilitiesTurn a weighted sum into a probability and a decision.7 min
  3. 3Nearest neighbours, in codeWrite a classifier from scratch and see why k matters.8 min
  4. 4Decision trees and forestsRead a decision tree and know why forests of trees work better.7 min

What you will learn

Terms explained in this course

class
One of the categories a classifier chooses between, such as "spam" or "not spam".
binary classification
Classification with exactly two classes, such as yes or no.
multiclass classification
Classification with three or more classes, such as recognising which of ten digits is in an image.
probability
A number from 0 to 1 saying how likely something is. 0 means impossible, 1 means certain, 0.5 means even odds.
logistic regression
A classification method that computes a weighted sum, like linear regression, then squeezes it with the sigmoid function into a probability.
distance
How far apart two examples are, worked out from their features.
euclidean distance
Straight-line distance: the square root of the sum of squared differences between the features.
k-nearest neighbours
A classifier that looks at the k most similar training examples and takes a vote among their labels. Often shortened to k-NN.
decision tree
A model that makes a prediction by asking a chain of yes-or-no questions about the features, like a flowchart.
leaf
An end point of a decision tree, where a prediction is given.
random forest
Many decision trees, each trained on a slightly different sample of the data, voting together. Usually more accurate than one tree.