Master data processing, modeling, and deep learning algorithms.
Supervised learning is learning from labeled examples. You give the algorithm many input-output pairs — features and the correct answer — and it learns a mapping from inputs to outputs that generalizes to new, unseen inputs. This lesson builds the mental model: features and labels, the difference between regression and classification, the classic algorithms (linear regression, logistic regression, decision trees, k-nearest neighbors, ensembles), and the central tension of overfitting and underfitting. You will also learn how to choose an algorithm and recognize the common mistakes. The worked examples use small, manually understandable datasets so the ideas stay clear.
| Term | Meaning | Example |
|---|---|---|
| Feature | Input the model sees | House size, bedrooms, location |
| Label (target) | Output the model predicts | Sale price |
| Training data | Labeled examples to learn from | Past house sales |
| Regression | Classification | |
|---|---|---|
| Predicts | A continuous number | A category |
| Example | Price = $210,000 | Spam or not spam |
| Output type | Numeric | Discrete class |
The loop is: prepare data, train on the training set, predict on unseen data, and evaluate how well the mapping generalizes.
| Underfitting | Overfitting | |
|---|---|---|
| Meaning | Model too simple to capture patterns | Model memorizes noise |
| Symptom | Poor on both train and test | Great on train, poor on test |
| Fix | More complexity / features | Simpler model, more data, regularization |
| Situation | Good starting choice |
|---|---|
| Predict a number, want interpretability | Linear regression |
| Two-class prediction, want probabilities | Logistic regression |
| Need explainable rules | Decision tree |
| High accuracy on tabular data | Random forest / gradient boosting |
| Small, clean dataset | k-NN or SVM |
Linear regression predicts price from size.
(the model learned a linear relationship)
Classifying emails as spam or not.
(the model maps features to a class)