Skip to content

What is Machine Learning?

Machine Learning is the science (and art) of programming computers so they can learn from data. Pioneer Arthur Samuel put it simply in 1959:

“[Machine Learning is the] field of study that gives computers the ability to learn without being explicitly programmed.”

Tom Mitchell gave a more engineering-flavored definition in 1997:

“A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E.”

Your spam filter is a good example. Given examples of spam emails (flagged by users) and regular (“ham”) emails, it learns to flag new spam. Here:

  • Task (T) — flag spam for new emails
  • Experience (E) — the training data (past emails, labeled spam/ham)
  • Performance (P) — accuracy: the ratio of emails classified correctly
diagram Diagram mermaid

If you just download a copy of Wikipedia, your computer suddenly has a lot more data — but it isn’t any better at a task. That’s why downloading data is not Machine Learning; learning means improving at T, measured by P, as you get more E.

The idea in one sentence

Machine Learning is a way to build programs that learn a mapping from inputs to outputs from examples, instead of hard-coded rules.

In ML, we usually have:

  • Inputs (features): the data we observe (like age, clicks, temperature)
  • Outputs (labels/targets): the thing we want to predict (like price, spam/not spam)
  • A model: a mathematical function with adjustable parameters
  • Training: the process of adjusting parameters so predictions match reality

A good mental model

Think of ML like learning a recipe from tasting many dishes.

  • Traditional programming: you write the recipe.
  • ML: you taste many examples (data), and the model approximates the recipe.

What problems is ML good for?

ML shines when:

  • the rules are too complex to write explicitly
  • the patterns are statistical and noisy
  • you want the system to improve with more data

Examples:

  • email spam detection
  • product recommendations
  • speech-to-text
  • fraud detection
  • predicting house prices

To summarize, from the book, Machine Learning is great for:

  • Problems needing lots of fine-tuning or long lists of rules — one ML algorithm can often simplify code and perform better than the traditional approach (spam filters are the classic example).
  • Complex problems with no known algorithm — e.g. speech recognition. You can’t hand-write rules for “high-pitch sound = the word two” that scale to millions of voices and languages, but a model can learn it from recordings.
  • Fluctuating environments — an ML system can retrain and adapt to new data, instead of being manually patched forever.
  • Getting insights about complex problems and large amounts of data — inspecting what a trained model learned can reveal patterns a human would never spot. This is called data mining.

ML is not magic

ML does not automatically mean:

  • correct answers
  • unbiased answers
  • causation (often it learns correlations)

You still must:

  • choose good data
  • evaluate correctly
  • monitor for drift and failures

Core vocabulary (keep these handy)

  • Feature: an input variable.
  • Target / label: output variable.
  • Dataset: many examples (rows) with features (columns).
  • Training: fitting a model.
  • Inference: using the trained model to predict.

Tiny checkpoint

Can you explain ML like this to a friend?

“ML is when we show a program many examples so it can learn patterns and make predictions on new data.”

🧪 Try It Yourself

Exercise 1 – Train-Test Split

Exercise 2 – Fit a Linear Model

Exercise 3 – Evaluate with MSE

If this helped you, consider buying me a coffee ☕

Buy me a coffee

Was this page helpful?

Let us know how we did