Machine Learning Essentials
What it is. Machine learning builds systems that learn from examples rather than rules. Its central idea is the bias-variance trade-off: how much to trust the data you have when predicting the data you will meet. A few methods, neighbours, regularized least squares, kernels, sparsity and principal components, cover the core.
What it gives you. It gives you the questions to ask of any data-driven claim: how many examples, how noisy, how was it checked on new data, and which variables really matter.
Learning from examples
Supervised learning starts with examples of inputs and correct outputs, such as images labelled face or not. The goal is not to describe those examples but to predict new ones. An image becomes a long list of pixel values, and the art lies in choosing that representation.
The simplest method copies the label of the nearest stored example. It makes no errors on its training data, yet its boundaries jump with each new small dataset: it is unstable. Voting among the k nearest neighbours smooths the answer; too many voters and it ignores detail.
That is the bias-variance trade-off. Variance is instability, which falls as more is averaged. Bias is blurring, which grows. The best balance depends on how much data there is, how noisy it is and how complex the true pattern is.
Three families
- Regularized least squares Fit a line while penalising large weights. The penalty keeps small, unreliable directions in the data from swinging the answer. Without it, problems with more variables than examples cannot be solved.
- Kernels Replace the measure of similarity between examples. A Gaussian kernel fits curved boundaries, wide ones near straight lines, narrow ones around single points.
- Sparsity Prefer solutions that use few variables. It shows which measurements matter, such as which genes separate two diseases.
Six points
- Hold data back Split data, train on one part and test on the other. With little data, leave out one example at a time.
- High dimensions In 10 dimensions, a cube holding 1% of the volume spans 63% of each side. Neighbours are no longer near.
- Greedy selection Pick the variable that explains most, subtract what it explains, repeat. Fast and often good enough.
- Convex shortcut Penalising the sum of absolute weights finds sparse solutions efficiently, where testing every subset is out of reach.
- Fewer samples If a signal has few active frequencies, far fewer samples than the classic rule suffice. This speeds up MRI scans.
- Main directions Principal components find where data vary most, to plot, compress or remove noise.
Rules of thumb
- 1% of a cube's volume
- 63% of each side it spans in 10 dimensions
- ~1800 when least squares was invented
- 1960s when regularization was introduced
- 2x classic sampling rate: twice the highest frequency
- 1 example left out at a time in leave-one-out testing
Prediction is not explanation
- In medicine, a model may sort patients into two disease types.
- Clinicians also want to know which measurements drove the answer.
- Sparse models answer by setting most weights to zero.
- Correlated measurements make the choice of variables ambiguous.
- A short list of variables is then a lead to investigate, not a final answer.
A good model predicts. A useful one also points to why.
Who invented least squares, Gauss or Legendre, has been argued over in long articles for two centuries.
Steps
- Toss a coin 10 times and count heads.
- Then toss it 50 more times and count again.
- Ten tosses can look unfair; many tosses settle near half. Small samples mislead. This is why models must not trust few data too much.
- Think of a rule of thumb you formed from two or three experiences.
- It fits your examples perfectly and may fail on the next one. Machine learning calls this overfitting.
- Ask of any prediction you read: was it tested on data it never saw?
- Holding back data to test on, called cross-validation, is the basic check of any learned model.
Time. 10 minutes
Words to know
- Overfitting
- Fitting the training data so closely, noise included, that predictions on new data get worse.
- Cross-validation
- Testing a model on data held back from training, to estimate how it will do on new data.
- Regularization
- Adding a penalty that keeps a model simple and stable, at the cost of fitting the data less exactly.
- Principal component analysis
- Finding the directions along which data vary most, to compress or visualise them.
Summarized by Irina Medelye · IRA X LAB.
More in Brains, Minds and Machines
- Intelligence: The Science and the Engineering
- Specialised Brain Regions and General Intelligence
- Feedforward and Feedback in Vision
- How the Brain Recognises Objects
- Faces, Primates and the Social Brain
- Place Cells, Replay and Memory in Sleep
- Learning in the Fly Brain
- The Mind as a Model of the World
- What Infants Know About Objects and Agents
- How Infants Understand Communication
- Children as Scientists
- Learning New Concepts from One Example
- How Infants Weigh Effort and Reward
- Where New Ideas Come From
- How Babies Learn to See Hands and Gaze
- Minimal Images: The Atoms of Recognition
- Answering Questions About Images and Text
- Connecting Sentences and Video
- Stories and the Human Mind
- Reading Word Meaning from the Brain
- Reading People at a Glance
- Faces, Thin Slices and the Social Mind
- Thinking About Thoughts: Theory of Mind in the Brain
- How Hearing Works: From the Ear to Sound Textures
- Speech and Music Regions in the Hearing Brain
- How Machines Learn to Recognise Speech
- A Humanoid Robot in a Disaster Challenge
- Self-Driving Cars and Robot Maps
- Layered Control in Animals and Robots
- Robots That Work Alongside People
- A Child-Sized Robot That Learns
- Invariance: Why Deep Networks Recognise
- Random Wiring, Sparse Codes and Deep Networks
- The Physics of Deep Learning
- Reading Content from Neural Populations
