Machine Learning · Picture Book
Neural Networks
A computer program that learns to recognize patterns by connecting thousands of tiny decision-makers and turning volume dials until guesses become answers.
1. The Artificial Neuron: A tiny math vote
A single neuron takes in numbers, multiplies each by an importance dial, adds them up, and decides whether to shout its own number forward.
Why each piece exists
- Inputs: Raw clues, such as pixel brightness or answers to simple questions.
- Weights: Importance dials. Positive weights vote yes; negative weights vote no.
- Bias: A baseline preference that makes the neuron trigger easily or stay quiet.
- Activation function: A filter that introduces non-linearity, keeping the network from collapsing into a flat addition sum.
2. Layers: Passing notes from simple to complex
One neuron can only separate things with a straight cut. Stacking them in layers lets early neurons spot lines, while deep neurons combine those lines into eyes, wheels, or letters.
How information builds up
- Layer 1 (Input): Directly reads the world, such as 28×28 image pixels.
- Middle Layers (Hidden): Find combinations. Two simple lines make a corner; three corners make an ear.
- Final Layer (Output): Weighs all high-level evidence to pick a category or output a value.
3. Training: Guessing, measuring, and nudging the dials
The network begins with random dials. With every practice example, it measures how far off its guess was and nudges each dial slightly in the direction that reduces error.
Why small nudges matter
- Gradient Descent: Calculates the steepest downhill direction toward zero error.
- Learning Rate: Controls how far to turn the dials after each mistake. A step too large overshoots; a step too small takes forever.
- Millions of repetitions: After looking at millions of examples, the network converges on a set of dials that generalizes well to new data.