Docsity

Machine Learning Notes, Summaries of Machine Learning

Toggle sidebar
bg1
MACHINE LEARNING
COURSE YEAR
II Year II Sem
STRUCTURE (L-T-P-C)
3 - 0 - 0 - 3
SUBJECT CODE
CS2204ML
COVERAGE
Units I to V (Full Syllabus)
UNIT-I: INTRODUCTION TO MACHINE LEARNING
Paradigms, Learning Methods, Pipeline Stages & Data Engineering
Unit Overview:
This unit establishes the core foundations of Machine Learning, charting its evolution from rule-based
AI systems to empirical data-driven models. It explores distinct learning paradigms (Rote, Induction, Reinforcement)
and details the end-to-end engineering pipeline required to transform raw datasets into predictive models.
CORE CONCEPTS & DEFINITIONS
Machine Learning (ML)
Field of study giving computers the capability to learn
patterns from experience (
E
) regarding tasks (
T
) and
performance metrics (
P
) without explicit programming.
Learning by Rote
Direct memorization of past data and query results. Enables
instantaneous lookup for identical inputs but fails
completely on novel, unseen data instances.
Learning by Induction
Extracting generalized rules or mathematical hypotheses
from speci
fi
c training observations to accurately predict
outcomes for unseen future inputs.
Feature Engineering
The domain-driven process of extracting, transforming, and
selecting relevant input variables from raw data to optimize
algorithm e
ffi
ciency.
DETAILED SUB-TOPIC BREAKDOWN
Evolution of ML:
Shifted from hardcoded expert decision trees to statistical optimization where models self-adjust
internal parameters via empirical observation.
ML Paradigms:
Supervised Learning:
Model trained on labeled paired datasets
(X, Y)
to learn mapping function
f(X)
→
Y
.
Unsupervised Learning:
Uncovers underlying patterns, structures, or groupings in unlabeled datasets
X
.
Reinforcement Learning:
Autonomous agent optimizes decision policies through environmental trial-and-error using
scalar rewards and penalties.
End-to-End Machine Learning Pipeline Stages:
1.
Data Acquisition & Data Sets:
Gathering raw unstructured/structured samples from data sources.
2.
Feature Engineering & Representation:
Cleaning, normalizing, vectorizing, and reducing dimensionality.
3.
Model Selection & Search:
Choosing model class (e.g., linear, tree-based) and searching hyperparameter space.
4.
Model Learning & Evaluation:
Training parameters on training sets and validating performance using holdout test sets.
5.
Model Prediction:
Deploying validated model to generate inferences on real-world stream data.
IMPORTANT QUESTIONS / EXAM FOCUS
1. Differentiate between Learning by Rote and Learning by Induction. Provide a real-world scenario for each.
2. Illustrate and explain the complete work
fl
ow of an end-to-end Machine Learning pipeline.
3. Why is Feature Engineering vital in ML development? Explain how poor data representation impacts model search.
QUICK REVISION SUMMARY
ML evolves systems from rigid rule-based logic to adaptive inductive pattern recognition.
The core paradigms are Supervised (labeled), Unsupervised (unlabeled), and Reinforcement (reward-driven).
MACHINE LEAR NING STUDY NOTES PAGE 1 O F 5
Comprehensive Semester Preparation & Master Revision Notes
pf3
pf4
pf5

Partial preview of the text

Download Machine Learning Notes and more Summaries Machine Learning in PDF only on Docsity!

MACHINE LEARNING

COURSE YEAR II Year II Sem

STRUCTURE (L-T-P-C) 3 - 0 - 0 - 3

SUBJECT CODE CS2204ML

COVERAGE Units I to V (Full Syllabus)

UNIT-I: INTRODUCTION TO MACHINE LEARNING

Paradigms, Learning Methods, Pipeline Stages & Data Engineering

Unit Overview: This unit establishes the core foundations of Machine Learning, charting its evolution from rule-based AI systems to empirical data-driven models. It explores distinct learning paradigms (Rote, Induction, Reinforcement) and details the end-to-end engineering pipeline required to transform raw datasets into predictive models.

CORE CONCEPTS & DEFINITIONS

Machine Learning (ML) Field of study giving computers the capability to learn patterns from experience ( E ) regarding tasks ( T ) and performance metrics ( P ) without explicit programming.

Learning by Rote Direct memorization of past data and query results. Enables instantaneous lookup for identical inputs but fails completely on novel, unseen data instances.

Learning by Induction Extracting generalized rules or mathematical hypotheses from specific training observations to accurately predict outcomes for unseen future inputs.

Feature Engineering The domain-driven process of extracting, transforming, and selecting relevant input variables from raw data to optimize algorithm efficiency.

DETAILED SUB-TOPIC BREAKDOWN

Evolution of ML: Shifted from hardcoded expert decision trees to statistical optimization where models self-adjust internal parameters via empirical observation. ML Paradigms: Supervised Learning: Model trained on labeled paired datasets (X, Y) to learn mapping function f(X) → Y. Unsupervised Learning: Uncovers underlying patterns, structures, or groupings in unlabeled datasets X. Reinforcement Learning: Autonomous agent optimizes decision policies through environmental trial-and-error using scalar rewards and penalties. End-to-End Machine Learning Pipeline Stages:

  1. Data Acquisition & Data Sets: Gathering raw unstructured/structured samples from data sources.
  2. Feature Engineering & Representation: Cleaning, normalizing, vectorizing, and reducing dimensionality.
  3. Model Selection & Search: Choosing model class (e.g., linear, tree-based) and searching hyperparameter space.
  4. Model Learning & Evaluation: Training parameters on training sets and validating performance using holdout test sets.
  5. Model Prediction: Deploying validated model to generate inferences on real-world stream data.

IMPORTANT QUESTIONS / EXAM FOCUS

  1. Differentiate between Learning by Rote and Learning by Induction. Provide a real-world scenario for each.
  2. Illustrate and explain the complete workflow of an end-to-end Machine Learning pipeline.
  3. Why is Feature Engineering vital in ML development? Explain how poor data representation impacts model search.

QUICK REVISION SUMMARY

ML evolves systems from rigid rule-based logic to adaptive inductive pattern recognition. The core paradigms are Supervised (labeled), Unsupervised (unlabeled), and Reinforcement (reward-driven).

Comprehensive Semester Preparation & Master Revision Notes

UNIT-II: NEAREST NEIGHBOR-BASED MODELS Proximity Measures, Distance Metrics, Instance Classifiers & Regression

Unit Overview: Unit II focuses on distance-based and instance-based (lazy) learning models. It covers mathematical proximity and similarity measures across continuous and binary feature spaces, detailed operations of K-Nearest Neighbor (KNN) for classification and regression, and standard statistical performance evaluation techniques.

CORE CONCEPTS & DISTANCE FORMULATIONS

Euclidean Distance ( L_2 Norm) Straight-line distance between vectors u and v :

d(u, v) = āˆšāˆ‘ (ui - vi)^2

Manhattan Distance ( L_1 Norm) Grid-like distance along axis-parallel paths:

d(u, v) = āˆ‘ |ui - vi|

Minkowski Distance Generalized distance metric of order p :

d(u, v) = (āˆ‘ |ui - vi|p)1/p

Lazy Learning Postpones generalization processing until a specific unlabeled test query point is presented to the system.

DETAILED SUB-TOPIC BREAKDOWN

Properties of Distance Metrics: A valid distance function must satisfy Non-negativity [ d(a,b) ≄ 0 ], Identity [ d(a,b)=0 ⇒ a=b ], Symmetry [ d(a,b)=d(b,a) ], and Triangle Inequality [ d(a,c) ≤ d(a,b)+d(b,c) ]. Binary Proximity Measures: For binary attributes, similarity is computed via matching coefficients: Jaccard Coefficient: J = q / (q + r + s) (ignores mutual absence t ). Simple Matching Coefficient (SMC): SMC = (q + t) / (q + r + s + t). KNN Classification & Radius Distance Algorithms: K-NN Classifier: Finds k nearest training instances to query point x_0 and performs majority voting. Radius Distance NN: Selects all neighbors within a fixed hypersphere of radius R around x_0 , resolving spatial density variations. KNN Regression: Computes mean or distance-weighted average output of the k nearest points: y_0 = (āˆ‘ w_i y_i) / āˆ‘ w_i where w_i = 1 / d(x_0, x_i). Performance Evaluation of Classifiers & Regression:

Task Type Evaluation Metrics Key Formulations / Concepts

Classification Accuracy, Precision, Recall, F1-Score, ROC-AUC Precision = TP / (TP + FP) Recall = TP / (TP + FN)

Regression Mean Absolute Error (MAE), Mean Squared Error (MSE), R-Squared MSE = (1/n) āˆ‘ (y_i - Å·_i)^2 R^2 measures variance explained.

IMPORTANT QUESTIONS / EXAM FOCUS

  1. Derive Minkowski distance and show how it simplifies to Euclidean and Manhattan distances.
  2. Explain the working of KNN algorithm. How does choice of K impact model variance and bias?
  3. Construct a confusion matrix and derive the mathematical formulas for Precision, Recall, and F1-score.

QUICK REVISION SUMMARY

KNN is a non-parametric lazy learner relying on distance metrics ( L_1, L_2 , Jaccard). Small values of K lead to low bias/high variance (overfitting); large K values oversmooth boundaries. Classification uses majority voting; Regression uses target value averaging (often distance-weighted).

UNIT-IV: LINEAR DISCRIMINANTS & NEURAL NETWORKS Perceptrons, Support Vector Machines, Kernels, Logistic Regression & Backpropagation

Unit Overview: Unit IV introduces linear boundary classifiers, optimization theory, and neural network foundations. It progresses from basic Perceptrons and Logistic/Linear Regression to maximal-margin Support Vector Machines (SVM), non-linear Kernel functions, and Multi-Layer Perceptrons trained via Backpropagation.

CORE CONCEPTS & DISCRIMINANT FUNCTIONS

Linear Discriminant Decision boundary hyperplane in feature space defined by linear equation: g(x) = wTx + b = 0.

Perceptron Rule Iterative weight update rule for misclassified instances: w ← w + Ī· (y - Å·) x.

SVM Margin Maximization Optimizes geometric margin 2/||w|| subject to constraint y_i(wTx_i + b) ≄ 1.

Logistic Sigmoid Function Maps real numbers to valid probability range (0, 1) : σ(z) = 1 / (1 + e-z).

DETAILED SUB-TOPIC BREAKDOWN

Perceptron Classifier & Learning Algorithm: Single-layer threshold element. Converges if and only if data is strictly linearly separable (fails on non-linear boundaries like XOR). Support Vector Machines (SVM) & Kernel Trick: Linearly Separable Case: Finds unique maximum-margin separating hyperplane. Points on margin boundaries are Support Vectors. Non-linear SVM & Kernel Trick: Maps input features into higher-dimensional space Φ(x) where data becomes separable. Computes inner products directly using kernels: K(x_i, x_j) = ⟨ Φ(x_i), Φ(x_j) ⟩ (e.g., RBF Kernel, Polynomial Kernel).

Logistic & Linear Regression Models: Linear Regression: Fits continuous outputs by minimizing Sum of Squared Errors (SSE) via normal equations or Gradient Descent. Logistic Regression: Uses Sigmoid transformation for binary probabilities; optimizes Cross-Entropy Loss. Multi-Layer Perceptrons (MLPs) & Backpropagation: MLP Architecture: Input layer, hidden layers with non-linear activations (ReLU, Sigmoid), and output layer. Backpropagation Algorithm: Uses calculus chain rule to calculate gradient of loss function with respect to every weight in network, propagating error backwards to update parameters via gradient descent: w{ij} ← w_{ij} - Ī· (āˆ‚E / āˆ‚w_{ij})_.

IMPORTANT QUESTIONS / EXAM FOCUS

  1. Explain the Perceptron convergence theorem and prove why a single-layer perceptron cannot solve XOR.
  2. Formulate the dual optimization problem for Support Vector Machines and detail the Kernel Trick.
  3. Derive the Backpropagation weight update equations for a 2-layer Feedforward Neural Network.

QUICK REVISION SUMMARY

Linear discriminants separate classes using hyperplanes; Perceptrons update weights on errors. SVM maximizes margins and uses kernel functions (RBF, Poly) for non-linear feature mapping. MLPs utilize hidden layers and Backpropagation (chain rule gradient descent) to learn complex mappings.

UNIT-V: CLUSTERING ALGORITHMS Partitional, Hierarchical, Matrix Factorization, Soft/Fuzzy, EM & Spectral Clustering

Unit Overview: Unit V addresses Unsupervised Clustering algorithms designed to discover hidden grouping structures in unlabeled datasets. It ranges from fundamental partitioning (K-Means) and hierarchical agglomeration to advanced soft partitioning (Fuzzy C-Means, Rough Sets), Expectation-Maximization (EM), and Spectral Graph Clustering.

CORE CONCEPTS & FORMULATIONS

K-Means Objective Minimizes within-cluster sum of squares (WCSS):

J = āˆ‘k āˆ‘x ∈ C

k

||x - μk||^2

Fuzzy Membership ( u{ij}_ ) Degree of belonging of point i to cluster j :

āˆ‘j=1C^ uij = 1, uij ∈ [0, 1]

Agglomerative Linkage Distance between clusters: Single (min), Complete (max), or Average pairwise point distance.

Spectral Graph Laplacian Constructs affinity matrix W and computes Graph Laplacian L = D - W for spectral projection.

DETAILED SUB-TOPIC BREAKDOWN

Partitional & Hierarchical Clustering: K-Means Algorithm: 1. Initialize k centroids randomly. 2. Assign each point to nearest centroid. 3. Recompute centroids as cluster mean. 4. Iterate until convergence. (Sensitive to outliers and initial centroids). Hierarchical Clustering: Agglomerative: Bottom-up approach; starts with singletons and merges closest pairs. Visualized via Dendrograms. Divisive: Top-down approach; recursively splits root cluster. Matrix Factorization & Soft Partitioning: Matrix Factorization: Decomposes data matrix X ā‰ˆ WH (e.g., NMF) to uncover latent cluster representations. Fuzzy C-Means (FCM): Soft clustering where points hold continuous membership degrees u{ij}_ across clusters. Uses fuzzifier exponent m. Rough K-Means Clustering: Incorporates Rough Set theory using Lower Approximation (definitely in cluster) and Upper Approximation (possibly in cluster) to capture boundary ambiguity. Advanced Clustering Frameworks: Expectation-Maximization (EM): Probabilistic framework for Gaussian Mixture Models (GMMs). Alternates between E- step (calculating expectation of hidden cluster assignments) and M-step (updating distribution parameters μ, Ī£, Ļ€ ). Spectral Clustering: Uses similarity graph spectrum to reduce dimensions before applying K-Means; excels on non- convex geometric shapes.

IMPORTANT QUESTIONS / EXAM FOCUS

  1. Step through K-Means clustering algorithm. Compare hard partitioning vs. soft partitioning (Fuzzy C-Means).
  2. Differentiate between Agglomerative and Divisive hierarchical clustering with neat dendrogram diagrams.
  3. Explain the E-step and M-step in Expectation-Maximization (EM) clustering for Gaussian Mixture Models.

QUICK REVISION SUMMARY

K-Means iteratively partitions data by updating centroids; Hierarchical clustering builds tree dendrograms. Fuzzy C-Means and Rough Sets allow continuous or bounded membership to handle ambiguous boundaries. EM fits probabilistic mixture models, while Spectral Clustering clusters along graph manifolds.