M.
Tech Class Notes Explained(Module 1)
Subject: Advanced Machine Learning & Deep Learning
Topic: Introduction to Machine Learning
1. Introduction to Machine Learning
ML is a subfield of AI where algorithms learn from data to make
predictions or decisions without being explicitly programmed for every
task.
Learning types:
o Supervised Learning: Learn from labeled data.
o Unsupervised Learning: Discover structure from unlabeled
data.
o Reinforcement Learning (RL): Learn from feedback (rewards).
o Semi-supervised: Combines small labeled + large unlabeled
data.
o Self-supervised: Learns representations by creating labels from
input data itself.
2. Training
The process of adjusting a model's internal parameters to minimize the
prediction error on training data.
Datasets:
o Training set: Used to fit the model.
o Validation set: Used to fine-tune model hyperparameters.
o Test set: Used for final performance evaluation.
3. Rote Learning
A primitive form of learning where the system memorizes inputs and
their outputs.
It doesn’t generalize, i.e., it can’t predict for unseen inputs.
4. Learning Concepts
A concept is a function from input space to output labels (e.g.,
whether an email is spam).
A concept class is a set of all possible functions (hypotheses) that can
define this mapping.
Learning = Finding the best approximation of the true concept from the
concept class.
5. General-to-Specific Ordering
Hypotheses are structured in a hierarchy:
o General hypothesis: Matches more examples (may include
incorrect ones).
o Specific hypothesis: Matches fewer, more accurate examples.
This ordering helps efficiently search for the correct hypothesis in
algorithms like Candidate Elimination.
6. Version Spaces
A version space is the subset of hypotheses that are still consistent
with all observed training examples.
Defined by:
o S: Specific boundary → Most specific consistent hypotheses.
o G: General boundary → Most general consistent hypotheses.
As training data increases, the space narrows.
7. Candidate Elimination Algorithm
It updates S and G iteratively:
o Positive examples → make S more general.
o Negative examples → make G more specific.
Learning continues until S and G converge (the exact target concept is
found) or they diverge (inconsistent data).
8. Inductive Bias
Every ML algorithm has assumptions that help it generalize beyond the
training data.
Without bias, learning is impossible (many hypotheses can explain the
data equally well).
Examples:
o k-NN: Nearby points are likely to share labels.
o Decision Trees: Favors simpler trees (Occam's Razor).
9. Decision Tree Induction
A tree structure where each internal node splits data by an attribute
and each leaf represents a class label.
Built using:
o Information gain (entropy reduction)
o Gini index (impurity measure)
Overfitting avoided by pruning unnecessary branches.
10. Overfitting
A model that fits the training data too closely, including noise, loses its
ability to generalize.
Solutions:
o Cross-validation: Robust performance estimate.
o Regularization: Penalizes complex models.
o Early stopping: Stops training before overfitting.
o Data augmentation: Increase data variety.
11. Nearest Neighbor Algorithm (k-NN)
Stores all training data. For a new input:
o Calculate distance to all points.
o Pick the top-k closest and vote on label.
Pros: Simple, no training needed.
Cons: High computation during testing; sensitive to irrelevant features.
12. Learning Neural Networks
A neural network is a collection of layers of interconnected nodes
(neurons).
Backpropagation: Main training algorithm; calculates gradients and
updates weights.
Activation functions:
o Sigmoid: Smooth but saturates.
o Tanh: Centered at 0.
o ReLU: Fast, sparse activation.
Challenges: Deep nets suffer from vanishing/exploding gradients.
13. Supervised Learning
Labeled data = inputs + correct outputs.
Algorithms:
o Linear regression: Predicts continuous values.
o Logistic regression: Binary classification.
o SVM: Maximize margin between classes.
o Neural nets: Flexible, handles nonlinearity.
Evaluation:
o Accuracy, Precision, Recall, F1, ROC-AUC.
14. Unsupervised Learning
Only input data; no labels.
Goals:
o Find hidden structure (clusters, patterns).
Methods:
o Clustering: Group similar data.
o Dimensionality Reduction: Simplify features.
Applications: Market segmentation, anomaly detection, compression.
15. Reinforcement Learning (RL)
Learning by interacting with an environment.
The agent takes actions → receives rewards → learns optimal strategy
(policy).
Key terms:
o Policy (π): Maps states to actions.
o Value function (V): Expected future rewards.
o Q-value (Q): Expected reward for state-action pair.
Algorithms:
o Q-learning: Learn value of actions directly.
o Actor-Critic: Learn both value and policy.
Applications: Game AI (AlphaGo), robotics, self-driving.
📊 Summary Table Explained
Concept Why It Matters
Rote vs. Concept
Shows importance of generalization
Learning
General-Specific
Organizes hypothesis search efficiently
Ordering
Version Space Narrows down consistent hypotheses
Inductive Bias Drives meaningful generalization
Real-world models must generalize, not
Overfitting
memorize
Supervised vs.
Determines learning strategy
Unsupervised
Reinforcement
Learns from feedback, not labels
Learning
📌 Suggested Diagrams
1. Version Space: Visual of narrowing between S and G.
2. Decision Tree: Split on attributes and class labels at leaves.
3. k-NN: Graph showing test point and neighbors.
4. Neural Net: Layered diagram with activations.
5. RL Agent: Feedback loop with environment and reward arrows.