Ch 3 · Linear Regression — Fitting a Line · Machine Learning & AI
Topic 3 of 13 in Machine Learning & AI — Foundations — 2 lessons.
A Line Through the Data
The simplest model predicts a number with a straight line: a weight w (the slope) and a bias b (where it crosses zero). "Fitting" means finding the w and b that pass closest to the data.
Measuring the Error
How wrong is a model? Take each prediction's gap from the truth, square it (so big misses hurt more and signs don't cancel), and average. That is Mean Squared Error — the number training tries to shrink.
All topics in Machine Learning & AI Beginner
- What Is Machine Learning?
- Data — Features, Labels & Splitting
- Linear Regression — Fitting a Line
- How Models Learn — Gradient Descent
- Classification — Predicting Categories
- Decision Trees
- Evaluating a Model Honestly
- Overfitting & the Bias-Variance Tradeoff
- The ML Workflow
- Mini-Project — A Spam Classifier
- Clustering — Finding Groups Without Labels
- Your First Real scikit-learn Model
- Words as Numbers — A Taste of NLP