Supervised learning is a machine learning approach where models learn from labeled examples. Each training example contains both input data and the correct answer.
Input — Animal Image
Label — Cat
Goal — Learn patterns that identify cats in future images
The model is supervised because it is given the correct answers during training. These answers act as a teacher and help the model learn.
The model studies labeled examples, finds patterns, and learns how inputs relate to outputs.
Collect labeled data
Split data into training and testing sets
Train the model on labeled examples
Evaluate performance on unseen data
Make predictions on new data
Features are the input variables used by the model. Labels are the correct outputs that the model learns to predict.
Features
Label — Spam or Not Spam
Training data teaches the model. The quality of training data greatly affects model performance.
Once training is complete, the model can use what it learned to make predictions on new examples. This process is called inference.
Classification predicts categories or labels. It answers the question: "What category does this belong to?"
Binary classification contains only two possible outcomes.
Multi-class classification contains three or more possible categories.
Regression predicts continuous numerical values rather than categories. It answers the question: "What number should be predicted?"
| Classification | Regression |
|---|---|
| Predicts categories | Predicts numbers |
| Spam or Not Spam | House Price |
| Cat or Dog | Temperature |
| Fraud Detection | Sales Forecast |
Healthcare — Disease diagnosis, medical imaging
Finance — Fraud detection, credit scoring
Retail — Product recommendations, sales forecasting
Technology — Face recognition, voice assistants, search engines
Overfitting occurs when a model memorizes training examples rather than learning general patterns that apply to new data.
Excellent performance on training data.
Poor performance on unseen data.
Strong performance on training data.
Similar performance on unseen data.
Choose a real-world problem and determine whether it is best solved using classification or regression. Explain what the features and labels would be.
Ask the AI if you need help understanding or want to dive deeper into any topic.