Artificial Intelligence
AI vs ML vs DL; Machine Learning — Supervised Learning
C-CAT
AI vs ML vs DL
Hierarchy Diagram
+--------------------------------------------------------------------------+
| ARTIFICIAL INTELLIGENCE (AI) |
| (Broad concept: making machines intelligent) |
| |
| +---------------------------------------------------------------+ |
| | MACHINE LEARNING (ML) | |
| | (Subset of AI: machines learn from data) | |
| | | |
| | +-------------------------------------------------------+ | |
| | | DEEP LEARNING (DL) | | |
| | | (Subset of ML: uses multi-layer neural networks) | | |
| | +-------------------------------------------------------+ | |
| +---------------------------------------------------------------+ |
+--------------------------------------------------------------------------+
Side-by-Side Comparison
| Feature | AI | ML | DL |
|---|---|---|---|
| Definition | Machines mimicking human behavior | Machines learn from data | Multi-layer neural networks learn features |
| Techniques | Rules, logic, search, ML, DL | Statistical models, decision trees | CNNs, RNNs, Transformers |
| Data need | Varies | High | Very high |
| Human intervention | High (traditional AI) | Moderate | Low |
| Performance | Varies | Good | Best for complex tasks |
| Hardware | Standard CPU | GPU helpful | GPU/TPU essential |
| Example | Siri (overall system) | Spam filter | Facial recognition |
Key Relationships
- All Deep Learning = Machine Learning — DL is a type of ML
- All Machine Learning = AI — ML is a way to achieve AI
- Not all AI = ML — AI includes rule-based systems too
- Not all ML = DL — ML also includes classical algorithms (decision trees, SVM)
Machine Learning — Supervised Learning
What is Machine Learning?
Machine Learning (ML) is a field of study that gives computers the ability to learn without being explicitly programmed (Arthur Samuel, 1959).
It involves training algorithms to recognize patterns in data and make predictions or decisions.
Mathematical foundation:
Input data: X = {x1, x2, x3, ..., xn}
Output: Y = f(X) (the mapping function)
Goal: Learn function f such that predicted Y matches actual Y
What is Supervised Learning?
Supervised Learning is where you have:
- Input variables (X) — known features/attributes
- Output variable (Y) — known label or target value
And you use an algorithm to learn the mapping function:
Y = f(X) (the Model / Formula)
Why "Supervised"? The algorithm learns from a labeled training dataset — like a teacher who gives correct answers while the student learns. The correct answers (labels Y) are provided and the algorithm iteratively corrects itself until it achieves acceptable accuracy.
Training Process:
Training Data (X, Y)
↓
Algorithm learns f(X)
↓
Trained Model
↓
Predict Y for new unseen X
Key Properties:
- Output variable is already known for each input variable
Algorithm learns to map input and output
- Model learns to associate features with predefined categories
- Learning stops when acceptable accuracy is achieved
10.1 Regression — Predicting Continuous Values
Regression is for predicting continuous/numeric output values (future values).
- Population growth prediction
- Life expectancy prediction
- Market forecasting/prediction
- Advertising popularity prediction
- Stock market price prediction
Additional Examples:
- House price prediction (given area, rooms, location)
Temperature prediction
- Sales revenue prediction
- Car fuel efficiency prediction
Regression Algorithms:
| Algorithm | Description | Use Case |
|---|---|---|
| Linear Regression | Fits: y = mx + b | Single feature, linear relationship |
| Multiple Linear Regression | y = m1x1 + m2x2 + ... + b | Multiple features |
| Polynomial Regression | Fits curved line: y = ax² + bx + c | Non-linear relationships |
| Logistic Regression | Predicts probability (0-1) | Binary classification (despite the name) |
| Ridge Regression | Linear + L2 regularization penalty | Prevent overfitting |
| Lasso Regression | Linear + L1 regularization penalty | Feature selection |
| Naive Bayes | Probabilistic, uses Bayes theorem | Text classification, fast |
| Support Vector Machine (SVM) | Finds optimal hyperplane | High-dimensional data |
Linear Regression Example:
House Price = 5000 x (Area sq ft) + 200000 x (Location Factor) + base_price
If Area = 1500 sq ft, Location Factor = 1.2:
Price = 5000 x 1500 + 200000 x 1.2 = 75,00,000 + 2,40,000 = Rs. 77,40,000
10.2 Classification — Predicting Categories
Classification is for predicting which category/class an input belongs to (discrete output).
- Find whether an email received is spam or ham
- Identify customer segments
- Find if a bank loan is granted
- Identify if a kid will pass or fail in an examination
Additional Examples:
- Is a tumor malignant or benign?
- Is a transaction fraudulent or legitimate?
- What digit is in this handwritten image (0-9)?
- Which species does this plant belong to?
Classification Algorithms:
| Algorithm | Description | Strength |
|---|---|---|
| Logistic Regression | Uses sigmoid function; outputs probability | Simple, interpretable |
| Decision Tree | Tree of if-else rules | Interpretable, visual |
| Random Forest | Ensemble of decision trees | High accuracy, robust |
| Support Vector Machine (SVM) | Finds hyperplane with maximum margin | High-dimensional data |
| K-Nearest Neighbor (KNN) | Classifies by majority vote of k nearest | Simple, non-parametric |
| Naive Bayes | Probabilistic classification | Fast, good for text |
Binary vs Multi-class Classification:
Binary: Spam/Ham, Yes/No, Pass/Fail, Fraud/Genuine
Multi-class: Dog/Cat/Bird/Fish, Digit (0-9), Disease type
Evaluation Metrics
| Metric | Formula | When to Use |
|---|---|---|
| Accuracy | Correct / Total | General balanced datasets |
| Precision | TP / (TP + FP) | When false positives are costly |
| Recall | TP / (TP + FN) | When false negatives are costly |
| F1-Score | 2 x (P x R) / (P + R) | Imbalanced datasets |
| MSE | Mean squared error | Regression |
| R² Score | Goodness of fit | Regression |
Continue learning
Related notes
Put this topic into timed practice
Open mock tests when you want full-exam pacing, or keep drilling in practice mode.