What is Machine Learning?
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
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 coffeeWas this page helpful?
Let us know how we did
