🤖 Machine Learning · AI
📅 March 2026 ⏱ ~8 min read 🟢 Beginner–Intermediate

What Is Machine Learning?

Machine learning is the science of getting computers to learn from data without being explicitly programmed. Understanding the three main paradigms — supervised, unsupervised, and reinforcement learning — plus the bias–variance tradeoff is enough to reason clearly about nearly every ML system in production.

What Machine Learning Actually Does

Classical software takes explicit rules as input and produces answers. Machine learning flips that: it takes examples (inputs + correct answers) and produces rules (a model that can answer new questions).

Traditional: rules + data → answers
ML: data + answers → rules (model)

Technically, ML finds a function f such that f(x) ≈ y for all training pairs (x, y), and then generalises to unseen x values.

Supervised Learning

The most common paradigm. Every training example has a labelled answer. The algorithm minimises the difference between its predictions and those labels.

📊

Regression

Predict a continuous number. House prices, temperature, stock returns.

🏷️

Classification

Predict a category. Spam/not spam, cat/dog, disease/no disease.

🔢

Ranking

Order items by relevance. Search results, recommendation feeds.

Common algorithms: linear/logistic regression, decision trees, random forests, gradient-boosted trees (XGBoost), support vector machines, and neural networks.

Unsupervised Learning

No labels — the algorithm must find structure in the data by itself. It groups similar examples, compresses representations, or detects anomalies without being told the "right answer".

Reinforcement Learning

An agent takes actions in an environment and receives rewards. The goal is to learn the policy (action selection strategy) that maximises cumulative reward over time.

Unlike supervised learning, there are no (x, y) pairs — the agent must discover which actions lead to reward through trial-and-error, often with long delays between action and reward.

Applications: game-playing AI (AlphaGo, OpenAI Five), robot locomotion, data-centre cooling optimisation, RLHF (fine-tuning language models to be helpful and safe).

Read the full deep-dive: Reinforcement Learning Explained →

Bias–Variance Tradeoff

Every prediction error from a model can be decomposed into:

Error = Bias² + Variance + Irreducible Noise
Underfitting
High Bias
Just right
Balanced
Overfitting
High Variance

Increasing model complexity (more parameters, higher polynomial degree) lowers bias but raises variance. The art of ML is finding the sweet spot given the amount of available data.

Overfitting and Regularisation

An overfitted model performs very well on training data but poorly on new examples — it has "memorised" rather than "learned".

Common fixes

How Models Generalise

Generalisation is the core mystery of ML. Overparameterised models — like a 175-billion-parameter GPT-3 trained on a trillion tokens — should overfit catastrophically by classical theory.

They don't, because of what researchers call the double descent phenomenon: as model size increases beyond the interpolation threshold, test error decreases again. SGD's implicit bias toward flat minima and structured data both play a role.

The practical upshot: if your data is large and diverse enough, bigger models often generalise better, not worse. This is counter-intuitive but now well-established empirically.

Choosing the Right Method

🧠 Open Neural Network →