Lesson 1.1 · 6 min read · about 45 min to master at a very slow pace
What is Machine Learning?
Machine learning is learning a prediction rule from data instead of writing it by hand. What that means, how it differs from traditional programming, and why the decision matters more than the prediction.
The one-sentence version
Machine learning (ML) is about making predictions and decisions from data. Instead of a programmer writing the rule, an algorithm learns the rule from examples. The term was coined by Arthur Samuel in 1959, whose checkers program learned to play better than he did by adjusting its own scoring rule from experience.
Traditional programming vs machine learning
In traditional programming you write the rules and the computer applies them. In machine learning you supply examples of inputs and the right outputs, and the algorithm finds a rule that maps one to the other.
| Traditional programming | Machine learning | |
|---|---|---|
| You provide | Rules + data | Data + answers (examples) |
| Computer produces | Answers | Rules (a fitted model) |
| Spam filter example | "If the subject contains FREE!!! then spam" | Learn which word patterns separate 100,000 labelled spam and non-spam emails |
| Breaks when | The world changes faster than you can update the rules | New data stops looking like the training data |
ML shines when the rule is too complicated to write down (recognising a face), changes over time (fraud patterns), or must be personalised (recommendations).
A model is a function
Whatever the method, the output of learning is a function that takes inputs (also called features or predictors) and returns a prediction of the target (also called the response, outcome or label). The hat on always means "estimated" or "predicted".
ML is not one technique. It is a toolbox of models (linear regression, logistic regression, SVMs, K-means, trees, neural networks...) and of methods for fitting and checking them.
Predictions exist to support decisions
A prediction is rarely the end goal. A hospital predicts readmission risk so it can decide who gets a follow-up call; a bank predicts default so it can decide whether to lend. That has a big consequence that runs through this whole course: the costs of different mistakes matter. Missing a sick patient is not the same as calling a healthy one, so "most accurate" and "most useful" are not always the same model.
Big idea
Machine learning is not about fitting the data you have. It is about predicting data you haven't seen yet, well enough to make good decisions.
Where ML sits
ML is part of the broader field of artificial intelligence, and it grew out of statistics and pattern recognition. Statistics and ML share most of their goals but historically differ in emphasis: statistics focuses more on inference (is this effect real?) and ML more on prediction at scale. The two are converging, and this course uses both perspectives: you will compute p-values and worry about test-set performance.
How it's asked
"Define machine learning and explain how it differs from traditional programming." A full answer mentions: learning a rule from data rather than coding it, the model as a function from inputs to outputs, and generalisation to new data as the goal.
Cheatsheet
Machine learning
Features vs target
Check your understanding
Score 75% or more to master this lesson and earn XP. Answer first, then check.