Machine Learning



Introduction to Machine Learning

Machine Learning (ML) is a branch of Artificial Intelligence that enables systems to learn from data and improve performance without being explicitly programmed.

Machine Learning

Definition: Machine Learning is the study of algorithms that improve automatically through experience.

Why Machine Learning?

  • Handles large volumes of data
  • Learns patterns automatically
  • Supports prediction and decision-making

ML vs Traditional Programming

Traditional ProgrammingMachine Learning
Rules + Data → OutputData + Output → Rules

Types of Machine Learning

(a) Supervised Learning

  • Learning with labeled data
  • Input-output pairs are known

Examples: Classification, Regression

(b) Unsupervised Learning

  • Learning with unlabeled data
  • Finds hidden patterns

Examples: Clustering, Association

(c) Reinforcement Learning

  • Learning through rewards and penalties
  • Agent interacts with environment

Types Summary Table

TypeDataExample
SupervisedLabeledSpam detection
UnsupervisedUnlabeledCustomer segmentation
ReinforcementFeedbackGame playing

Application Areas of Machine Learning

AreaApplication
HealthcareDisease prediction
FinanceFraud detection
MarketingRecommendation systems
NLPLanguage translation
RoboticsAutonomous control

Decision Trees

A Decision Tree is a tree-structured model used for classification and regression.

Components

ComponentDescription
Root NodeTop decision point
Internal NodeCondition test
Leaf NodeOutput decision

Simple Decision Tree Diagram

       Age?
      /    \
   Young   Old
    |       |
   Yes     No

Advantages & Disadvantages

AdvantagesDisadvantages
Easy to understandOverfitting
No data normalizationSensitive to noise

Statistical Learning Methods

Statistical learning uses probability and statistics to model relationships in data.

Common Methods

MethodUse
Linear RegressionPrediction
Logistic RegressionClassification
k-Nearest NeighborSimilarity-based
Support Vector MachineMargin-based

Learning with Complete Data 

Learning with complete data means all variables and labels are fully observed.

Characteristics

  • No missing values
  • Direct probability estimation
  • Easier model training

Naïve Bayes Model

Naïve Bayes is a probabilistic classifier based on Bayes’ theorem.

Bayes’ Theorem

P(C|X) = (P(X|C)P(C)) / P(X)

Assumption

  • Features are conditionally independent

Example: Spam classification using word probabilities

Advantages & Limitations

AdvantagesLimitations
Fast & simpleIndependence assumption
Works with small dataLower accuracy sometimes

Learning with Hidden Data

Hidden data refers to unobserved or missing variables during learning.

Challenges

  • Incomplete information
  • Indirect observation

Example

  • Hidden customer intent
  • Hidden system states

EM Algorithm (Expectation–Maximization)

EM algorithm is used to learn parameters when data is incomplete or hidden.

Steps of EM Algorithm

StepDescription
E-StepEstimate missing data
M-StepMaximize likelihood

EM Flow Diagram

Initial Guess
     ↓
  E-Step
     ↓
  M-Step
     ↓
 Converge

Applications

  • Clustering
  • HMM training
  • Missing data problems

Reinforcement Learning

Reinforcement Learning (RL) is a learning method where an agent learns by interacting with environment.

Key Elements

ElementDescription
AgentLearner
EnvironmentWorld
ActionDecision
RewardFeedback
PolicyStrategy

Reinforcement Learning Diagram

Agent → Action → Environment
  ↑                ↓
 Reward ← State ←——

Applications

  • Robotics
  • Game AI
  • Self-driving cars

Comparison Summary

Learning TypeData TypeExample
SupervisedCompleteNaïve Bayes
UnsupervisedHiddenEM Algorithm
ReinforcementFeedbackQ-learning

MCA Exam-Oriented Tips

  • Write Bayes’ theorem clearly
  • Draw EM and RL diagrams
  • Compare supervised vs reinforcement learning
  • Explain assumptions of Naïve Bayes
  • Use tables for advantages & disadvantages


End of Notes