1) Supervised and Unsupervised Machine Learning
Supervised Learning
-------------------
Definition: Supervised learning is a type of machine learning where the model is trained on labeled
data, meaning each training example is paired with an output label.
Goal: Learn a function that maps inputs to outputs.
Process:
1. Input data (features) and correct output (labels) are given.
2. The model learns the relationship between input and output.
3. After training, it can predict the output for new, unseen inputs.
Examples:
- Classification: Predicting discrete labels (e.g., spam or not spam).
- Regression: Predicting continuous values (e.g., predicting house prices).
Algorithms Used:
- Decision Trees
- Support Vector Machines (SVM)
- Linear Regression
- Logistic Regression
- K-Nearest Neighbors (KNN)
- Neural Networks
Unsupervised Learning
---------------------
Definition: In unsupervised learning, the algorithm is given data without labels, and it tries to find
hidden patterns or structure in the data.
Goal: Discover underlying structure or distribution in the data.
Examples:
- Clustering: Grouping similar data points (e.g., customer segmentation).
- Dimensionality Reduction: Reducing the number of features while retaining essential information
(e.g., PCA - Principal Component Analysis).
Algorithms Used:
- K-Means Clustering
- Hierarchical Clustering
- DBSCAN
- PCA (for feature reduction)
- Autoencoders
Key Differences
---------------
| Feature | Supervised Learning | Unsupervised Learning |
|----------------|-----------------------------|-----------------------------|
| Data | Labeled | Unlabeled |
| Goal | Predict outcomes | Find patterns or structure |
| Output Type | Classification / Regression | Clustering / Association |
| Example Algo | Linear Regression, SVM | K-Means, PCA |