BTCE | 5th Sem
AiML SubjectUnit 4

(5th sem) AIML Chapter 4: Complete Concepts Guide

Chapter 4: Bayesian Learning and Clustering Techniques -> Generated and Prepared By Thiruselvan (ThiruXD)

20.1 Introduction to Bayesian Learning

Definition: Bayesian Learning is a statistical approach to machine learning that uses probability theory to represent and reason about uncertainty. Unlike traditional learning methods that produce a single hypothesis, Bayesian learning considers multiple hypotheses and assigns probabilities to them based on available evidence.

Foundation: Bayes’ Theorem provides a mathematical framework for updating beliefs when new information becomes available.

Basic Concept Flow:

Prior Knowledge → New Observations → Bayes Theorem → Updated Knowledge → Prediction

Probabilistic Learning Framework Components:

ComponentDescription
Hypothesis SpaceThe set of all possible hypotheses
Prior ProbabilityInitial belief about a hypothesis before observing data
Training DataEvidence used for learning
Posterior ProbabilityUpdated probability after observing data
Prediction MechanismSelection of the most probable hypothesis

Framework Flow:

Hypothesis Space → Prior Probabilities → Training Data → Bayesian Updating
→ Posterior Probabilities → Prediction

20.2 Characteristics of Bayesian Learning

1. Handling Uncertainty:

Bayesian learning manages uncertainty by assigning probabilities to multiple possible outcomes rather than making definite conclusions.

Example — Medical Diagnosis:

DiseaseProbability
Influenza0.60
Pneumonia0.25
COVID-190.15

As more symptoms become available, these probabilities are updated.

Advantages of Handling Uncertainty:

  • Supports decision-making under incomplete information
  • Provides confidence measures for predictions
  • Reduces impact of noisy data
  • Improves robustness in real-world applications

2. Prior and Posterior Knowledge:

TypeDefinitionExample
Prior ProbabilityInitial belief before observing evidenceP(Rain Tomorrow) = 0.40
Posterior ProbabilityUpdated belief after observing evidenceP(Rain

Learning from Experience:

Initial Disease Probability = 40% → New Symptom Added → Updated Probability = 70%

3. Continuous Learning: Bayesian systems continuously improve predictions by incorporating new observations incrementally.


20.3 Applications of Bayesian Learning

DomainApplicationDescription
Medical DiagnosisDisease predictionCalculate probability of diseases based on symptoms
Spam FilteringEmail classificationLearn probability of spam based on word patterns
Decision SupportBusiness decisionsEvaluate uncertain situations for managers
Financial AnalysisRisk assessmentCredit risk, fraud detection, stock prediction
Weather ForecastingRain predictionUpdate probabilities based on atmospheric conditions
RoboticsNavigationHandle uncertainty in sensor data
NLPText classificationSentiment analysis, language translation

Advantages of Bayesian Learning:

  1. Handles uncertainty effectively
  2. Incorporates prior knowledge
  3. Learns incrementally from new data
  4. Provides probabilistic predictions
  5. Works well with small datasets
  6. Supports decision-making under uncertainty
  7. Reduces overfitting in many applications

Limitations:

  1. Requires probability estimates
  2. Computationally expensive for large hypothesis spaces
  3. Performance depends on quality of prior knowledge
  4. Assumptions may not always hold in real-world scenarios

UNIT 21: BAYES THEOREM AND CONCEPT LEARNING

21.1 Bayes Theorem

Definition: Bayes Theorem describes the relationship between conditional probabilities and provides a method for calculating the probability of an event based on prior knowledge.

Mathematical Expression:

P(H∣D)=P(D∣H)⋅P(H)P(D)P(H|D) = \frac{P(D|H) \cdot P(H)}{P(D)}

Components:

ComponentSymbolMeaning
Posterior ProbabilityP(HD)
Likelihood ProbabilityP(DH)
Prior ProbabilityP(H)Initial belief about hypothesis
Evidence ProbabilityP(D)Overall probability of observing data

Components Flow:

Bayes Theorem
├── Prior: P(H)
├── Likelihood: P(D|H)
├── Evidence: P(D)
└── Posterior: P(H|D)

Probability Concepts:

ConceptDefinitionExample
Conditional ProbabilityP(AB) — likelihood of A given B
Joint ProbabilityP(A∩B) — likelihood of both A and BP(Rain and Thunderstorm)
Marginal ProbabilityP(A) — likelihood of A regardless of BP(Rain)

21.2 Bayes Theorem in Machine Learning

Posterior Probability: Machine learning algorithms use posterior probability to make predictions. The hypothesis with the highest posterior probability is selected.

Bayesian Learning Process:

Training Data → Prior Probabilities → Bayes Theorem → Posterior Probabilities → Prediction

Likelihood Function: Measures how well a hypothesis explains the observed data.

Example — Email Classification: Words like “Free”, “Winner”, “Prize” strongly support hypothesis that email is spam.

Importance of Likelihood:

  • Measures compatibility between data and hypothesis
  • Helps distinguish competing hypotheses
  • Forms basis of Bayesian classification

Bayesian Learning Framework Steps:

  1. Define hypotheses
  2. Assign prior probabilities
  3. Collect training data
  4. Compute likelihood values
  5. Calculate posterior probabilities
  6. Select most probable hypothesis

21.3 Bayes Theorem and Concept Learning

Concept Learning Overview: Concept learning is the process of learning a target concept from training examples. Bayesian learning provides a probabilistic framework for this.

Hypothesis Evaluation Example:

HypothesisPosterior Probability
H10.10
H20.25
H30.55
H40.10

Result: H3 selected (highest posterior probability)

Learning from Examples:

Training Examples → Probability Update → Hypothesis Evaluation → Concept Learned

Advantages of Bayesian Concept Learning:

  • Handles noisy training data
  • Supports uncertain environments
  • Considers multiple hypotheses
  • Produces probabilistic predictions
  • Provides better generalization

21.4 Applications of Bayes Theorem

ApplicationDescriptionExamples
ClassificationAssign instances to classesSpam detection, medical diagnosis, sentiment analysis
PredictionForecast future valuesWeather, disease, financial forecasting
Medical DiagnosisIdentify diseasesInfluenza, pneumonia, COVID-19
Spam FilteringClassify emailsSpam / Not Spam
Decision SupportAssist decision-makingBusiness analytics, risk assessment

Bayesian Classification Flow:

Input Data → Bayes Theorem → Probability Calculation → Class Assignment

Advantages of Bayes Theorem:

  1. Provides mathematical framework for uncertainty
  2. Combines prior knowledge with new evidence
  3. Produces probabilistic predictions
  4. Works effectively with incomplete information
  5. Supports incremental learning
  6. Handles noisy datasets
  7. Forms basis for many ML algorithms

Limitations:

  1. Requires accurate probability estimates
  2. Performance depends on prior knowledge
  3. Computationally expensive for large datasets
  4. Assumptions may not reflect real-world conditions

UNIT 22: ML, LS ERROR HYPOTHESIS AND MDL PRINCIPLE

22.1 Maximum Likelihood (ML) Hypothesis

Definition: The Maximum Likelihood Hypothesis is the hypothesis that maximizes the probability of observing the training data.

Mathematical Formula:

hML=arg⁡max⁡h∈HP(D∣h)h_{ML} = \arg\max_{h \in H} P(D|h)

Where:

  • h_ML = Maximum Likelihood Hypothesis
  • H = Hypothesis Space
  • D = Training Data
  • P(D|h) = Probability of observing data D given hypothesis h

Hypothesis Selection Example:

HypothesisLikelihood
H10.30
H20.75
H30.45

Result: H2 selected (highest likelihood)

ML Estimation Example — Coin Toss:

  • Number of Heads = 80
  • Number of Tosses = 100
  • P(Head) = 80/100 = 0.8

Applications of ML Estimation:

  • Parameter estimation
  • Classification models
  • Regression analysis
  • Bayesian learning
  • Neural network training

22.2 Least Squared Error (LS) Hypothesis

Definition: The Least Squared Error Hypothesis minimizes the prediction error between actual and predicted values.

Error Function:

E=∑i=1n(yi−y^i)2E = \sum_{i=1}^{n} (y_i - \hat{y}_i)^2

Where:

  • y_i = Actual Value
  • ŷ_i = Predicted Value
  • E = Total Squared Error

Error Minimization Process:

Initial Model → Calculate Error → Adjust Parameters → Reduced Error → Better Model

Importance of Least Squared Error:

  • Simple to compute
  • Penalizes large errors
  • Suitable for regression problems
  • Widely used in machine learning

Example:

  • Actual Output = 50
  • Predicted Output = 45
  • Error = 50 - 45 = 5
  • Squared Error = 25

22.3 ML for Predicting Values

Definition: Maximum Likelihood estimation is used for prediction tasks by estimating model parameters that best explain observed data.

Prediction Model Flow:

Historical Data → ML Estimation → Model Building → Future Prediction

Parameter Estimation Example — Linear Model:

y=ax+by = ax + b

Values of a and b estimated using training data. Once estimated, model predicts future values.

Applications:

  • House price prediction
  • Weather forecasting
  • Sales forecasting
  • Demand prediction

Importance of ML Prediction:

  • Improves forecasting accuracy
  • Supports intelligent decision-making
  • Learns patterns from historical data
  • Provides data-driven predictions

22.4 Minimum Description Length (MDL) Principle

Definition: MDL is a model selection technique where the best hypothesis provides the shortest complete description of both the model and the training data.

Concept:

Training Data → Candidate Models → Description Length Evaluation → Select Minimum Length

Model Selection:

MDL selects model that minimizes:

Model Description Length+Data Description Length\text{Model Description Length} + \text{Data Description Length}

MDL vs Overfitting/Underfitting:

ConditionTraining AccuracyTesting AccuracyProblem
OverfittingHighLowModel too complex
UnderfittingLowLowModel too simple
Ideal (MDL)HighHighBalanced complexity

Advantages of MDL:

  1. Prevents overfitting
  2. Encourages simpler models
  3. Improves generalization
  4. Supports efficient model selection
  5. Reduces unnecessary complexity

Applications:

  • Decision Tree Learning
  • Bayesian Learning
  • Data Compression
  • Pattern Recognition
  • Knowledge Discovery
  • Machine Learning Model Selection

UNIT 23: BAYESIAN CLASSIFIERS

23.1 Bayes Optimal Classifier

Definition: The Bayes Optimal Classifier is the theoretically optimal classifier that minimizes the probability of classification error by considering all possible hypotheses.

Mathematical Formula:

vBO=arg⁡max⁡vj∑hi∈HP(vj∣hi)P(hi∣D)v_{BO} = \arg\max_{v_j} \sum_{h_i \in H} P(v_j|h_i)P(h_i|D)

Where:

  • v_BO = Bayes Optimal prediction
  • v_j = Possible class value
  • h_i = Hypothesis
  • P(h_i|D) = Posterior probability of hypothesis
  • P(v_j|h_i) = Probability that hypothesis predicts class v_j

Working Principle:

Training Data → Posterior Probabilities → Combine All Hypotheses → Final Class

Example — Medical Diagnosis:

HypothesisProbabilityPrediction
H10.40Disease
H20.30Disease
H30.20No Disease
H40.10Disease

Combined Probability:

  • Disease = 0.40 + 0.30 + 0.10 = 0.80
  • No Disease = 0.20
  • Final Prediction: Disease

Advantages:

  • Minimum possible classification error
  • Considers all hypotheses
  • Strong theoretical foundation
  • Provides optimal predictions

Limitations:

  • Computationally expensive
  • Difficult to evaluate large hypothesis spaces
  • Requires posterior probabilities for all hypotheses

23.2 Gibbs Algorithm

Definition: The Gibbs Algorithm approximates the Bayes Optimal Classifier by randomly selecting one hypothesis according to its posterior probability.

Algorithm Procedure:

  1. Calculate posterior probabilities for all hypotheses
  2. Randomly select one hypothesis according to its probability
  3. Use selected hypothesis for classification
  4. Repeat process when required

Example:

HypothesisPosterior Probability
H10.50
H20.30
H30.20

Algorithm randomly selects one hypothesis. If H1 selected, prediction = output of H1.

Approximation to Bayes Optimal:

  • Expected error of Gibbs ≤ 2 × error of Bayes Optimal
  • Practical alternative when exact Bayesian classification is infeasible

Advantages:

  • Computationally efficient
  • Easy implementation
  • Suitable for large hypothesis spaces

Limitations:

  • Random selection may lead to inconsistent predictions
  • Accuracy lower than Bayes Optimal

23.3 Naïve Bayes Classifier

Definition: Naïve Bayes applies Bayes Theorem with the simplifying assumption that all attributes are conditionally independent given the class label.

Conditional Independence Assumption: Attributes are independent given the class.

Example — Email Classification: Attributes: Contains “Free”, Contains “Winner”, Contains “Lottery” Naïve Bayes assumes occurrence of one word does not influence another when class (Spam/Not Spam) is known.

Bayes Theorem for Classification:

P(C∣X)=P(X∣C)⋅P(C)P(X)P(C|X) = \frac{P(X|C) \cdot P(C)}{P(X)}

Where:

  • C = Class
  • X = Feature vector
  • P(C|X) = Posterior probability
  • P(X|C) = Likelihood
  • P(C) = Prior probability

Classification Procedure:

  1. Calculate prior probabilities of classes
  2. Calculate likelihood probabilities of attributes
  3. Apply Bayes Theorem
  4. Compute posterior probabilities
  5. Select class with maximum probability

Classification Flow:

Input Features → Calculate Priors → Calculate Likelihoods → Apply Bayes Rule
→ Posterior Probabilities → Final Class

Example: Email contains: Free, Winner, Offer

  • P(Spam|Email) = 0.95
  • P(Not Spam|Email) = 0.05
  • Classification: Spam

Advantages:

  • Simple and easy to implement
  • Fast training and prediction
  • Works well with large datasets
  • Handles high-dimensional data effectively
  • Requires less training data

Limitations:

  • Independence assumption may not hold
  • Performance decreases when attributes are highly correlated
  • Sensitive to zero-frequency problems

23.4 Applications of Bayesian Classifiers

ApplicationDescriptionExamples
Text ClassificationAssign documents to categoriesNews categorization, topic classification
Spam DetectionIdentify spam emailsEmail filtering
Sentiment AnalysisIdentify opinions in textProduct reviews, social media monitoring
Medical DiagnosisDisease predictionSymptom-based diagnosis
Fraud DetectionIdentify fraudulent activitiesCredit card fraud
Recommendation SystemsSuggest productsE-commerce, streaming services

Text Classification Flow:

Document → Bayesian Classifier → Sports / Technology

Spam Detection Flow:

Email → Feature Extraction → Naïve Bayes Model → Spam / Not Spam

Sentiment Analysis Flow:

Customer Review → Bayesian Classifier → Positive / Negative

UNIT 24: BAYESIAN BELIEF NETWORKS AND EM ALGORITHM

24.1 Bayesian Belief Networks (BBN)

Definition: A Bayesian Belief Network is a graphical representation used to model uncertain knowledge and probabilistic relationships among variables. It combines probability theory and graph theory.

Structure:

  • Nodes represent variables
  • Directed edges represent probabilistic dependencies
  • Each node has a Conditional Probability Table (CPT)

Example:

Rain → Wet Road → Traffic Jam
  • Rain influences whether road becomes wet
  • Wet road increases probability of traffic congestion

Graphical Representation — DAG:

    A
   / \
  ▼   ▼
  B   C
   \ /
    ▼
    D
  • A influences B and C
  • B and C together influence D
  • No cycles allowed

Conditional Dependencies:

Cloudy → Rain → Wet Grass

P(WetGrass | Rain) = Probability grass is wet given it has rained.


24.2 Components of Bayesian Belief Networks

ComponentDescriptionExample
NodesRepresent variables or eventsDisease, Fever, Rain, Traffic
Directed EdgesRepresent dependencies between variablesSmoking → Lung Cancer
Probability Tables (CPT)Specify probability of node given parent statesP(Wet Road

Conditional Probability Table Example:

RainP(Wet Road = Yes)
Yes0.95
No0.05

Interpretation:

  • If it rains, probability of wet road is 95%
  • If it does not rain, probability is only 5%

Advantages of BBN:

  • Handling uncertainty
  • Knowledge representation
  • Probabilistic inference
  • Decision support
  • Learning capability

Applications:

  • Medical diagnosis
  • Risk analysis
  • Fault detection
  • Weather prediction
  • Expert systems

24.3 Expectation Maximization (EM) Algorithm

Definition: EM is an iterative statistical technique for estimating unknown parameters when data contains missing values or hidden variables.

EM Framework:

Initial Parameters → E-Step → M-Step → Updated Parameters → Repeat Until Convergence

E-Step (Expectation Step):

  • Missing or hidden information is estimated
  • Expected values calculated using current parameters
  • Probabilities of hidden variables computed

Example: Estimate probability that each customer belongs to a specific cluster.

E-Step Flow:

Current Parameters → Estimate Hidden Data → Expected Values

M-Step (Maximization Step):

  • Parameters updated using expected values from E-step
  • Likelihood of observed data maximized

M-Step Flow:

Expected Values → Update Parameters → Maximize Likelihood

EM Iteration Process:

Start → E-Step → M-Step → Convergence? → Yes: Stop / No: Repeat

Advantages:

  • Handles missing data
  • Robust parameter estimation
  • Flexible framework
  • Supports unsupervised learning

Limitations:

  • May converge to local optima
  • Slow convergence for large datasets
  • Sensitive to initialization

24.4 Applications of EM Algorithm

ApplicationDescriptionExamples
ClusteringGroup similar data pointsCustomer segmentation, market analysis
Missing Data AnalysisEstimate missing valuesMedical databases, survey analysis
Pattern RecognitionIdentify hidden patternsFace recognition, speech recognition

Clustering Flow:

Dataset → EM Algorithm → Clusters

Missing Data Analysis Flow:

Incomplete Data → EM Algorithm → Estimated Values

Pattern Recognition Flow:

Raw Data → EM Learning → Pattern Discovery

UNIT 25: K-MEANS CLUSTERING

25.1 Introduction to Clustering

Definition: Clustering is an unsupervised learning technique that groups similar data objects into clusters such that objects within the same cluster are more similar to each other than to objects in different clusters.

Supervised vs Unsupervised Learning:

AspectSupervised LearningUnsupervised Learning
LabelsKnown labelsNo labels available
GoalPredict outputDiscover patterns
ExampleClassificationClustering

Objectives of Clustering:

  • Discover hidden patterns
  • Organize large datasets
  • Identify similarities among data points
  • Support decision-making and data analysis

Characteristics of Good Clustering:

  1. High similarity within clusters
  2. Low similarity between clusters
  3. Compact cluster structure
  4. Meaningful separation of groups

Clustering Concept:

Dataset → Clustering → Cluster1 / Cluster2 / Cluster3

25.2 K-Means Clustering

Definition: K-Means partitions a dataset into K predefined clusters by finding K cluster centers (centroids) and assigning each data point to the nearest centroid.

Basic Principle:

  • “Means” refers to average value of data points within a cluster
  • Objective: Minimize distance between data points and assigned cluster centers

K-Means Process:

Dataset → Select K Centroids → Assign Data Points to Clusters
→ Recalculate Centroids → Repeat Until Stable

Cluster Formation Example:

  • K = 3
  • Cluster 1 → High Spending Customers
  • Cluster 2 → Medium Spending Customers
  • Cluster 3 → Low Spending Customers

Cluster Formation Flow:

Customer Data → K-Means Algorithm → Cluster A / Cluster B / Cluster C

25.3 Steps of K-Means Algorithm

Step 1: Initialization

  • Select number of clusters (K)
  • Randomly choose K initial centroids

Step 2: Assignment Step

  • Assign each data point to nearest centroid

  • Distance measured using Euclidean Distance:

    d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

Step 3: Centroid Update

  • Recalculate centroid of each cluster

  • New centroid = average of all points in cluster:

    Centroid=∑xinCentroid = \frac{\sum x_i}{n}

Step 4: Convergence

  • Repeat assignment and update steps
  • Stop when centroids no longer change significantly

Convergence Process:

Initialize → Assign Points → Update Centroids → Converged? → Yes: Stop / No: Repeat

Example — Student Marks:

StudentMarks
S135
S240
S342
S475
S578
S680

K = 2:

  • Cluster 1: 35, 40, 42 (low performers)
  • Cluster 2: 75, 78, 80 (high performers)

25.4 Advantages and Limitations

Strengths of K-Means:

StrengthDescription
SimplicityEasy to understand and implement
Fast ExecutionComputationally efficient for large datasets
ScalabilityWorks effectively with large volumes of data
Easy InterpretationCluster centers provide meaningful summaries

Weaknesses of K-Means:

WeaknessDescription
Choosing KSelecting correct number of clusters is difficult
Sensitive to InitializationDifferent initial centroids produce different results
Sensitive to OutliersExtreme values affect cluster centers
Assumption of Spherical ClustersPerforms best with compact, well-separated clusters

Advantages Flow:

K-Means → Simple / Fast / Scalable / Interpretable

Limitations Flow:

K-Means → Outliers / Initial Centroids / K Value / Cluster Shape

25.5 Applications of K-Means

ApplicationDescriptionBenefits
Customer SegmentationDivide customers into groupsPersonalized marketing, customer retention
Image SegmentationDivide image into regionsMedical imaging, object recognition
Data AnalysisDiscover hidden patternsMarket research, social network analysis
Document ClusteringGroup similar documentsNews categorization
Recommendation SystemsSuggest productsE-commerce
Fraud DetectionIdentify anomaliesFinancial transactions

Customer Segmentation Flow:

Customer Data → K-Means → Group1 / Group2 / Group3

Image Segmentation Flow:

Image → K-Means → Segmented Regions

UNIT 26: HIERARCHICAL CLUSTERING AND CLUSTER VALIDATION

26.1 Hierarchical Clustering

Definition: Hierarchical Clustering builds a hierarchy of clusters that can be visualized as a tree-like structure called a dendrogram.

Types:

TypeApproachDescription
AgglomerativeBottom-upEach point starts as own cluster; merge similar clusters
DivisiveTop-downAll points in one cluster; repeatedly split

Agglomerative Clustering:

Step 1: A B C D (each separate)
Step 2: (A,B) C D (merge closest)
Step 3: AB C D
Step 4: ABC D
Step 5: ABCD (all merged)

Agglomerative Process:

A B C D
| | | |
+----+ | |
 AB | |
 +-----+ |
 ABC |
 +-----+
 ABCD

Divisive Clustering:

Step 1: ABCD (all together)
Step 2: AB CD (split)
Step 3: A B C D (continue splitting)

Divisive Process:

 ABCD
 / \
 AB CD
 / \ / \
 A B C D

Advantages of Agglomerative:

  • Simple to understand
  • Produces complete cluster hierarchy
  • No need to specify number of clusters initially
  • Useful for exploratory data analysis

Disadvantages:

  • Computationally expensive for large datasets
  • Once clusters merged, cannot be separated
  • Sensitive to noise and outliers

26.2 Dendrogram Representation

Definition: A dendrogram is a tree-like graphical representation showing how clusters are formed during hierarchical clustering.

Shows:

  • Order of cluster formation
  • Similarity levels among clusters
  • Hierarchical relationships

Dendrogram Structure:

Distance
   |
 10 | --------
   | | |
  8 | ---- |
   | | |
  6 | ---- |
   | | |
  4 |-- |
   |
   +-------------------------
    A B C D

Interpretation:

  • Horizontal cut through dendrogram produces clusters
  • Example: Cut at distance level 6
    • Cluster 1 → A, B
    • Cluster 2 → C, D

Dendrogram Interpretation Flow:

Cluster Formation → Dendrogram → Select Cutting Level → Obtain Clusters

26.3 Cluster Validity Measures

1. Silhouette Coefficient:

Measures how similar an object is to its own cluster compared to other clusters.

Range: -1 ≤ S ≤ 1

ValueMeaning
Near 1Well-clustered
Near 0Overlapping clusters
Near -1Incorrect clustering

Advantages:

  • Easy interpretation
  • Measures both cohesion and separation

2. Dunn Index:

Evaluates cluster quality by comparing:

  • Minimum distance between clusters
  • Maximum diameter within clusters

Characteristics:

  • Larger values preferred
  • Encourages compact clusters
  • Promotes well-separated clusters

Dunn Index Flow:

Inter-Cluster Distance (Higher) + Intra-Cluster Distance (Lower) → Higher Dunn Index

3. Davies-Bouldin Index:

Evaluates clustering quality by measuring cluster similarity.

DB IndexQuality
LowBetter
HighPoor

Advantages:

  • Simple computation
  • Widely used in clustering evaluation

26.4 Evaluation of Clustering Results

Cluster Quality Assessment:

A good clustering solution should exhibit:

CharacteristicDescription
High Intra-Cluster SimilarityObjects within a cluster should be highly similar
Low Inter-Cluster SimilarityDifferent clusters should be clearly separated

Cluster Quality Flow:

Good Clustering → High Intra-Similarity / Low Inter-Similarity

Comparison of Clustering Techniques:

FeatureK-MeansHierarchical
Number of ClustersRequired (K)Not required
ScalabilityHighModerate
Dendrogram SupportNoYes
InterpretabilityModerateHigh
Computational CostLowHigh

Comparison Flow:

Clustering Methods → K-Means (Fast & Simple) / Hierarchical (Detailed Hierarchy)

26.5 Applications of Hierarchical Clustering

ApplicationDescriptionExamples
BioinformaticsAnalyze gene expression dataGene sequencing, DNA analysis
Document ClusteringGroup similar documentsResearch papers, news articles
Market ResearchSegment customersCustomer segmentation, product recommendation
Image ProcessingGroup similar imagesMedical diagnosis
Social Network AnalysisIdentify communitiesFraud detection

Bioinformatics Flow:

Gene Data → Hierarchical Clustering → Gene Groups

Document Clustering Flow:

Documents → Clustering → Topic Groups

Market Research Flow:

Customer Data → Hierarchical Clustering → Customer Segments

CHAPTER 4 SUMMARY TABLE

UnitTopicKey Concepts
20Introduction to Bayesian LearningProbability, uncertainty, prior/posterior, applications
21Bayes Theorem and Concept LearningBayes theorem, likelihood, posterior, classification
22ML, LS Error Hypothesis, MDLMaximum likelihood, least squared error, MDL principle
23Bayesian ClassifiersBayes optimal, Gibbs, Naïve Bayes, applications
24Bayesian Belief Networks and EMBBN, DAG, CPT, EM algorithm, applications
25K-Means ClusteringCentroids, assignment, update, convergence, applications
26Hierarchical ClusteringAgglomerative, divisive, dendrogram, validation

KEY FORMULAS REFERENCE

ConceptFormula
Bayes Theorem$P(H
Maximum Likelihood$h_{ML} = \arg\max_{h \in H} P(D
Least Squared ErrorE=∑i=1n(yi−y^i)2E = \sum_{i=1}^{n} (y_i - \hat{y}_i)^2
MDL Principle$\text{Minimize } L(h) + L(D
Bayes Optimal Classifier$v_{BO} = \arg\max_{v_j} \sum_{h_i} P(v_j
Naïve Bayes$P(C
Euclidean Distanced=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
CentroidCentroid=∑xin\text{Centroid} = \frac{\sum x_i}{n}
Silhouette CoefficientS=b−amax⁡(a,b)S = \frac{b - a}{\max(a, b)}

CONCEPT RELATIONSHIPS MAP

                    BAYESIAN LEARNING
                           |
        ┌──────────────────┼──────────────────┐
        ▼                  ▼                  ▼
   Bayes Theorem     Bayesian Classifiers   BBN & EM
        |                  |                  |
   ┌────┴────┐        ┌────┴────┐        ┌────┴────┐
   ▼         ▼        ▼         ▼        ▼         ▼
Prior    Posterior  Naïve   Bayes    BBN      EM
P(H)     P(H|D)    Bayes   Optimal  (DAG)   (E/M)
        |                  |
   ┌────┴────┐        ┌────┴────┐
   ▼         ▼        ▼         ▼
 ML       MDL      Gibbs    Applications
Hypothesis Principle Algorithm
        |
   ┌────┴────┐
   ▼         ▼
 LS Error  Prediction
Hypothesis  Models

                    CLUSTERING TECHNIQUES
                           |
        ┌──────────────────┼──────────────────┐
        ▼                  ▼                  ▼
   K-Means          Hierarchical        Cluster
   Clustering        Clustering         Validation
        |                  |                  |
   ┌────┴────┐        ┌────┴────┐        ┌────┴────┐
   ▼         ▼        ▼         ▼        ▼         ▼
Centroids  Assign   Agglom   Divisive  Silhouette Dunn
          Points   erative            Coefficient Index
        |                  |
   ┌────┴────┐        ┌────┴────┐
   ▼         ▼        ▼         ▼
Update    Converge  Dendrogram Applications
Centroids

On this page