1.5 KiB
1.5 KiB
Introduction to Machine Learning
Supervised Learning
Supervised learning is like teaching a computer with examples. You give the computer inputs (predictors) and the correct answers (targets). The computer learns a "map" or rule to connect the inputs to the outputs.
- Goal: Find a model that maps input variables to a target variable.
- Example: Detecting phishing emails.
- You show the computer emails with phrases like "You have won million".
- You tell the computer these are "Spam".
- The computer learns to flag similar new emails as Spam.
Types of Supervised Learning
There are two main types of problems:
- Regression: Predicting a number (e.g., predicting house prices).
- Classification: Predicting a category or label (e.g., Spam vs Not Spam).
Classification
In classification, the target variable is a category (also called a class label).
Example:
- Labels: Cold, Warm, Hot.
- The model maps an instance to one of these labels.
Types of Classification
1. Binary Classification
There are only two possible classes.
- Examples:
- Email: Spam or Not Spam.
- Loan: Approve or Reject.
- Medical: Disease or No Disease.
- Exam: Pass or Fail.
2. Multiclass Classification
There are more than two classes.
- Examples:
- Digit Recognition: 0, 1, 2, ..., 9 (10 classes).
- Fruit: Apple, Banana, Mango, Orange.
- Movie Genre: Action, Comedy, Drama, Horror.
- Sentiment: Very Negative, Negative, Neutral, Positive, Very Positive.