Perceptron & Linear Classification
The Foundation of All Neural Networks
What You'll Discover
From raw weather data to a trained AI predictor in 10 clear steps
Binary Classification
Learn to sort data into two categories - predicting rain vs sunny using humidity and temperature measurements.
Perceptron Architecture
Meet the simplest neural network - a single neuron with inputs, weights, bias, and a decision rule.
Learning from Mistakes
Watch the perceptron adjust its weights every time it makes a wrong prediction, gradually improving its accuracy.
Training & Convergence
See how epochs of training lead to convergence - stable weights that correctly classify all data points.
Generalization
Test the trained model on new, unseen data - the real measure of whether it learned a rule, not just memorized answers.
Foundation for Neural Networks
Understand how this simple building block scales up to power modern AI systems with multiple layers.
Key Concepts Covered
Binary Classification
Sorting data into two categories using a simple decision rule
Decision Boundaries
The line that separates different classes in a scatter plot
Perceptron Learning Rule
How the algorithm adjusts weights when it makes mistakes
Epochs & Training
Iterating through all data points to gradually improve accuracy
Convergence
When the perceptron finds stable weights that classify all data correctly
Generalization
Testing the trained model on new, unseen data to verify real learning
Ready for More?
Continue your AI journey with these related concepts
Can We Predict Rain?
Imagine you want to predict the weather using just two measurements: humidity and temperature. You have 6 days of historical data.
Can you spot the pattern? Rainy days tend to have high humidity and cooler temperatures. Sunny days tend to have lower humidity and warmer temperatures.
Our Dataset:
- •Day 1: 85% humidity, 18°C → Rain
- •Day 2: 75% humidity, 16°C → Rain
- •Day 3: 65% humidity, 22°C → Rain
- •Day 4: 40% humidity, 30°C → Sunny
- •Day 5: 45% humidity, 28°C → Sunny
- •Day 6: 55% humidity, 25°C → Sunny
The Goal: Teach the simplest possible AI (a perceptron) to find this pattern automatically.
Can you see the two clusters on the scatter plot? Blue dots (rainy) tend to be in the upper-left region, yellow dots (sunny) in the lower-right.
Weather Dataset (6 Days)
| Day | Humidity | Temperature | Weather |
|---|---|---|---|
| Day 1 | 85% | 18°C | 🌧️ Rain |
| Day 2 | 75% | 16°C | 🌧️ Rain |
| Day 3 | 65% | 22°C | 🌧️ Rain |
| Day 4 | 40% | 30°C | ☀️ Sunny |
| Day 5 | 45% | 28°C | ☀️ Sunny |
| Day 6 | 55% | 25°C | ☀️ Sunny |