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

FeatureAIMLDL
DefinitionMachines mimicking human behaviorMachines learn from dataMulti-layer neural networks learn features
TechniquesRules, logic, search, ML, DLStatistical models, decision treesCNNs, RNNs, Transformers
Data needVariesHighVery high
Human interventionHigh (traditional AI)ModerateLow
PerformanceVariesGoodBest for complex tasks
HardwareStandard CPUGPU helpfulGPU/TPU essential
ExampleSiri (overall system)Spam filterFacial 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:

AlgorithmDescriptionUse Case
Linear RegressionFits: y = mx + bSingle feature, linear relationship
Multiple Linear Regressiony = m1x1 + m2x2 + ... + bMultiple features
Polynomial RegressionFits curved line: y = ax² + bx + cNon-linear relationships
Logistic RegressionPredicts probability (0-1)Binary classification (despite the name)
Ridge RegressionLinear + L2 regularization penaltyPrevent overfitting
Lasso RegressionLinear + L1 regularization penaltyFeature selection
Naive BayesProbabilistic, uses Bayes theoremText classification, fast
Support Vector Machine (SVM)Finds optimal hyperplaneHigh-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:

AlgorithmDescriptionStrength
Logistic RegressionUses sigmoid function; outputs probabilitySimple, interpretable
Decision TreeTree of if-else rulesInterpretable, visual
Random ForestEnsemble of decision treesHigh accuracy, robust
Support Vector Machine (SVM)Finds hyperplane with maximum marginHigh-dimensional data
K-Nearest Neighbor (KNN)Classifies by majority vote of k nearestSimple, non-parametric
Naive BayesProbabilistic classificationFast, 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

MetricFormulaWhen to Use
AccuracyCorrect / TotalGeneral balanced datasets
PrecisionTP / (TP + FP)When false positives are costly
RecallTP / (TP + FN)When false negatives are costly
F1-Score2 x (P x R) / (P + R)Imbalanced datasets
MSEMean squared errorRegression
R² ScoreGoodness of fitRegression

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.