Supervised learning is the workhorse of applied machine learning: you show an algorithm examples paired with correct answers, and it learns a function that maps new inputs to predictions. Before touching code, you need a clear mental model of how that learning actually happens and where it breaks down.
The Training Loop
Every supervised algorithm follows the same rhythm. It makes predictions on training examples, measures how wrong those predictions are using a loss function, and adjusts internal parameters to reduce that error. Linear models adjust coefficients, tree models choose better split points, and neural networks update weights through gradient descent. The algorithm differs; the loop does not.
Generalization Versus Memorization
A model that scores perfectly on training data may still be useless. Memorizing examples is easy; generalizing to unseen data is the actual goal. This is why practitioners always hold out a test set the model never sees during training. The gap between training performance and held-out performance tells you whether the model learned patterns or noise.
Bias and Variance in Practice
Underfit models are too simple to capture real structure, while overfit models chase random fluctuations. In practice you diagnose this by comparing training and validation error curves. High error on both suggests more capacity or better features; low training error with high validation error suggests regularization, more data, or a simpler model.
Action Step
Load a public dataset such as the scikit-learn iris or diabetes set, split it 80/20 into train and test partitions, fit a simple model, and record the accuracy or error on each split. Write one sentence explaining what the gap between the two numbers tells you.
Educational content only. The AI/ML tooling landscape changes quickly — verify current library versions, APIs, and best practices in official documentation. This course does not certify anyone.