Supervised learning is a type of machine learning where the model is trained on labeled data. In other words, the input data is paired with the correct output data, and the model learns to predict the output based on the input.
Key Concepts
- Training Data: Labeled data used to train the model.
- Test Data: Unlabeled data used to evaluate the model's performance.
- Model: The algorithm that learns from the training data to predict the output.
Types of Supervised Learning
- Classification: The output is a discrete value. Example: Email spam filter.
- Regression: The output is a continuous value. Example: Predicting house prices.
Common Algorithms
- Linear Regression
- Logistic Regression
- Support Vector Machines (SVM)
- Random Forest
- Gradient Boosting
Example
To predict whether an email is spam or not, we can use a Logistic Regression model. We train the model on a dataset containing emails labeled as "spam" or "not spam".