SchoolWhool
Quizzes and saved progress, freeSign in freeSign in
Machine Learning · Module 1

What Machine Learning Is

Take each lesson, answer its quiz, then do its practice. After the last lesson come the module quiz, the project and the interview questions.

Lessons

  1. 1.1What Is Machine Learning?Tell a program written from rules apart from a program learned from examples, and say what "learning" concretely means: parameters chosen to fit data.
  2. 1.2The Kinds of Machine LearningFrom the question being asked, tell whether a problem is regression, classification, clustering or something else.
  3. 1.3The Machine Learning WorkflowKnow the steps every project goes through, and what goes wrong when one is skipped.
  4. 1.4Samples, Features and LabelsTurn a real table into `X` and `y`, and name each column's type.
  5. 1.5Where Data Comes FromSee how collection and labelling decide what a model can learn, before any algorithm runs.

Module material

Take these after the last lesson, in this order. Next on each page leads through them.

  1. Module quiz15 questions across the whole module. Take it after the last lesson; your first pick on each question is the one that counts.
  2. Project: Better Than 25 mpg, From One ThresholdStated as a problem, with no template and no step-by-step instructions. Working out the steps is the point.
  3. NotebooksOpen them in Google Colab. Each answer is checked as you go: correct, wrong with the expected value, or not answered yet.
  4. Cheat sheetOne page of the module’s terms, rules and gotchas, with the output each rule produces.
  5. Interview questions15 questions interviewers ask on this module’s topics, from first principles to the follow-ups. Each comes with a model answer.

Glossary

Every term the module introduces, with the lesson that introduces it.

example
One item of data, with its label: a message and spam or ham. 1.1
label
The answer a program should give for an example. 1.1
rule-based program
A program that follows a rule a person wrote, such as "spam if it contains free". 1.1
accuracy
The fraction of answers that are right: (spam caught + ham passed) / all. 1.1
baseline
The simplest program that answers, which a model has to beat: here, "ham" for every message. 1.1
feature (reminder, Maths 00.1)
A measured value of an example that the model uses: the digit count. 1.1
parameter
A number inside a model that is chosen from data: t. 1.1
model
The form of the rule, with its parameters left open: "spam when the digit count is at least t". 1.1
training (restated from Maths 00.1)
Choosing a model's parameters to make the fewest errors on labelled examples. 1.1
training data
The labelled examples used in training: 4,459 messages. 1.1
held-aside data
Labelled examples kept out of training, used only to score the model: 1,115 messages. 1.1
inference
Running a trained model on examples it was not trained on. 1.1
machine learning
Choosing a program's parameters from examples, then using it on new examples. 1.1
supervised learning
Learning from examples whose labels are known. 1.2
regression
Supervised learning where the answer is a quantity, so being close counts. 1.2
classification
Supervised learning where the answer is one of a set of categories. 1.2
binary
Classification with two classes, such as spam or ham. 1.2
multi-class
Classification with more than two classes, such as the ten digits. 1.2
unsupervised learning
Finding structure in examples that have no labels. 1.2
clustering
Finding groups of similar examples (Module 12). 1.2
anomaly detection
Finding unusual examples (Module 13). 1.2
dimensionality reduction
Describing examples with fewer columns (Module 11). 1.2
semi-supervised learning
Learning from a few labelled and many unlabelled examples. 1.2
self-supervised learning
Learning from labels taken from the data itself, as a language model predicts the next word. 1.2
reinforcement learning
Learning which actions to take from rewards; outside this track. 1.2
workflow
The ordered steps of a machine learning project: frame, collect, split, explore, baseline, model, evaluate, iterate, deploy, monitor. 1.3
held-aside data (reminder, ML 1.1)
Examples set aside before any model is built, used only to score it. 1.3
evaluation
Scoring a trained model on data it was not trained on. 1.3
iteration
One change to the model, then evaluating again. 1.3
memorisation
Storing the training examples' answers instead of learning a rule, as model M does. 1.3
deployment
Running a model on new data as part of a real system. 1.3
monitoring
Measuring a deployed model's score on new labelled data. 1.3
validation set (narration)
Data kept apart for choosing between versions of a model, so the final test is used once (Module 4). 1.3
sample
One row of the table, one thing being described: a car. 1.4
label (target) (reminder, ML 1.1 and Maths 00.1)
The column the model predicts: mpg. 1.4
feature
A column the model uses to predict the label. 1.4
feature matrix
The table of features, one row per sample, written X. 1.4
label vector
The labels, one per sample, written y. 1.4
shape
The number of rows, and of columns, of an array: (398, 7); a vector's has one number, (398,). 1.4
numerical
A column whose values are amounts; continuous when any value in a range is possible, discrete when it counts. 1.4
categorical
A column whose values name groups, even when they are stored as numbers. 1.4
time (narration)
A column whose order matters and whose differences mean something, such as the model year. 1.4
text data
A column of free text. 1.4
ordinal
Categories with an order, such as a kitchen graded excellent to poor. 1.4
image data
Pixel values, one feature per pixel. 1.4
missing value
A cell with no recorded value, read by pandas as NaN. 1.4
feature space (reminder, Maths 2.1)
The space with one dimension per feature, in which each sample is a point. 1.4
human labelling
People deciding the label of each example. 1.5
sampling frame (reminder, Stats 1.7)
The set of units that could end up in a sample; here, four particular collections of messages. 1.5
selection bias (reminder, Stats 1.7)
When the way rows are chosen makes the data differ from the population a claim is about. 1.5
survivorship bias (reminder, Stats 2.3)
A summary built only from the cases that passed a selection step: the spam people complained about. 1.5
collection artifact
A pattern in the data made by how it was collected, not by what it records. 1.5
duplicate
A row whose content repeats another row. 1.5
data-quality check
A test of the data for problems, run before any model. 1.5
annotator
A person who labels examples. 1.5
label noise
Labels that are wrong. 1.5
train/serve mismatch
A difference between the data a model was trained on and the data it runs on. 1.5