Counted from the questions in the past papers listed on this site. Repeated = how many times the topic came in those papers.
Machine Learning important questions with answers
Each answer starts with the short answer. Then come the points to write, a diagram and an exam tip. The questions under each topic are copied from the RGPV papers.
Q1. Machine learning: life cycle, types, challenges and relation with AI and data science
Asked 4 times in 2022, 2023, 2024, 2025 · Unit 1
From the papers
“Explain the concept of Machine Learning. Describe Machine Learning Life cycle.” (Jun 2025)
“Describe Supervised and Unsupervised Learning with suitable example.” (Jun 2025)
“Define machine learning and explain its life cycle. Discuss the challenges associated with machine learning.” (Jun 2025)
“Critically examine the sustainability of instance based learning for real-time applications compared to model based learning.” (Dec 2024)
The short answer
Machine learning (ML) lets a computer learn patterns from data instead of following hand-written rules. AI is the wide goal of making machines act intelligently; ML is the part of AI that learns from data; deep learning is ML with many-layer neural networks. Data science uses statistics, ML and domain knowledge to get insight from data.
Write these points
Machine learning life cycle
Define the problem and the success measure.
Collect data from files, databases, sensors or the web.
Prepare data: clean, encode, scale, split.
Explore and select features.
Train models and tune hyperparameters.
Evaluate on test data (accuracy, F1, RMSE).
Deploy the model as a service.
Monitor and retrain: data changes over time (data drift), so accuracy falls unless the model is checked and retrained.
Batch (offline): trained once on all data. Online: learns step by step as data arrives
Monthly sales model; stock price feed
Generalization
Instance based (stores examples, compares, like KNN). Model based (builds a model, like regression)
KNN; linear regression
Online learning suits real-time streams and limited memory; instance based learning is simple but slow at prediction time because every query is compared with stored data.
Challenges of ML
Too little or poor quality data, noise and missing values.
Non-representative or biased data.
Irrelevant features.
Overfitting and underfitting.
Costly computing, hard to explain, data drift after deployment.
Supervised and unsupervised on the same shop data.
Data: 5,000 customers with age, spend and whether they bought a new phone.
Supervised: use the "bought" label to train a classifier that predicts which new customers will buy (accuracy 88%).
Unsupervised: ignore the label and cluster by age and spend: 3 groups appear (students, families, high spenders).
Same data, different goals: prediction needs labels; finding groups does not.
Real-life example
A cricket coach (AI) wants to win. Studying past matches to find patterns is machine learning. Reports on which bowler suits which pitch, for the selectors, are data science.
Figure: machine learning life cycle
Same or opposite: batch and online learning
Point
Batch learning
Online learning
Same or opposite
Training
All data at once
Small pieces as they arrive
Opposite
Learns from data
Yes
Yes
Same
Adapts to new data
Only after full retraining
Continuously
Opposite
Memory and compute
High
Low per step
Opposite
Exam tip. Draw the life cycle as a loop that ends with monitor and retrain. Define AI, ML, DL and data science with their relation. Give the types table and five challenges.
“Describe partitioning clustering and hierarchical clustering with examples.” (Jun 2025)
“Discuss in detail various types of clustering methods.” (Dec 2024)
“Explain the concept of clustering in machine learning. How does it differ from other tasks like classification and regression?” (Nov 2023)
The short answer
Clustering groups unlabelled data so that points in a group are similar and points in different groups are not. It is unsupervised, unlike classification (labels known) and regression (numeric target known). Main types are partitioning, hierarchical, density based, distribution model based and fuzzy clustering.
Write these points
Types of clustering
Type
Idea
Example algorithm
Partitioning
Split into k groups, improve by moving points
k-means, k-medoids
Hierarchical
Build a tree of merges or splits
AGNES (agglomerative), DIANA (divisive)
Density based
Clusters are dense regions
DBSCAN
Distribution model based
Each cluster is a probability distribution
Gaussian mixture model
Fuzzy
A point belongs to clusters with degrees
Fuzzy c-means
Partitioning clustering (k-means)
Choose k and k starting centroids.
Assign every point to the nearest centroid.
Recompute each centroid as the mean of its points.
Repeat until assignments stop changing.
Hierarchical clustering
Agglomerative (AGNES): start with each point alone; merge the two closest clusters until one remains.
Divisive (DIANA): start with one cluster; split off the most different points until each is alone.
Linkage: single (closest pair), complete (farthest pair), average.
The result is a dendrogram; cutting it at a height gives clusters.
{P3, P6} with {P4, P5}: largest pairwise distance is P3 to P4 = 0.22. Merge at 0.22.
Last: {P1, P2} with {P3, P6, P4, P5}: largest distance P1 to P4 = 0.52. One cluster at 0.52. Cutting at 0.3 gives two clusters.
Real-life example
A teacher sorting a new class into study groups by marks and interests, with no list of groups given, is clustering.
Figure: complete linkage dendrogram
Same or opposite: agglomerative and divisive clustering
Point
Agglomerative (AGNES)
Divisive (DIANA)
Same or opposite
Direction
Bottom up: merge
Top down: split
Opposite
Builds a dendrogram
Yes
Yes
Same
Starts with
Each point alone
All points together
Opposite
Cost
Lower, more common
Higher
Opposite
Exam tip. Define clustering and say how it differs from classification. Give the types table, k-means steps, AGNES and DIANA, then build the dendrogram step by step with distances.
Q3. Gaussian mixture models, expectation maximization and parameter estimation (MLE and MAP)
Asked 4 times in 2022, 2023, 2024, 2025 · Unit 2
From the papers
“Discuss Model-Based Clustering technique with suitable example.” (Jun 2025)
“Compare and contrast MLE and MAP in the context of parameter estimation.” (Dec 2024)
“Explain the concept of distribution model-based clustering. What are Gaussian Mixture Models (GMMs) and how are they used in this context?” (Nov 2023)
“Discuss in detail when MLE is preferred over MAP and MAP over MLE.” (Nov 2023)
The short answer
A Gaussian mixture model (GMM) says the data come from k Gaussian (normal) distributions mixed together: p(x) = Σ πₖ N(x | μₖ, Σₖ). It is distribution model based clustering: each point gets a probability of belonging to each cluster. Its parameters are found by expectation maximization (EM). MLE and MAP are the two ways of estimating parameters.
Write these points
EM algorithm for a GMM
Initialize means μₖ, covariances Σₖ and weights πₖ (for example from k-means).
E step: responsibility rᵢₖ = πₖ N(xᵢ | μₖ, Σₖ) ÷ Σⱼ πⱼ N(xᵢ | μⱼ, Σⱼ), the probability point i belongs to cluster k.
M step: update πₖ = (Σᵢ rᵢₖ) ÷ n, μₖ = Σᵢ rᵢₖ xᵢ ÷ Σᵢ rᵢₖ and Σₖ from the weighted spread.
Repeat until the log-likelihood stops increasing.
Importance of EM: handles hidden (latent) variables, gives soft clusters, finds elliptical clusters of different sizes; but it can stop at a local optimum and needs k.
MLE and MAP
Point
MLE
MAP
Maximizes
P(D | θ)
P(D | θ) P(θ)
Prior belief
Not used
Used
Prefer when
Data are plentiful
Data are few and a good prior exists
Relation
MAP with a flat prior
Approaches MLE as data grow
Coin bias by MLE and MAP.
10 tosses, 7 heads.
MLE: θ = 7 ÷ 10 = 0.70.
MAP with a Beta(2, 2) prior (belief that the coin is roughly fair): θ = (7 + 2 − 1) ÷ (10 + 2 + 2 − 2) = 8 ÷ 12 = 0.67.
The prior pulls the estimate towards 0.5. With 1,000 tosses and 700 heads both give about 0.70.
Real-life example
Heights in a college come from two groups, girls and boys, each roughly bell shaped. A GMM finds both bells and tells, for a height of 165 cm, the chance it belongs to each group.
Figure: expectation maximization
Same or opposite: k-means and GMM
Point
k-means
GMM
Same or opposite
Assignment
Hard: one cluster
Soft: probabilities
Opposite
Needs the number of clusters
Yes
Yes
Same
Cluster shape
Round
Elliptical
Opposite
Method
Distances to centroids
EM on probabilities
Opposite
Exam tip. Write the GMM formula, then the E and M steps with formulas. Give the MLE and MAP table with when each is preferred and the coin example.
“Discuss the Ensemble Learning. Explain Max Voting Technique using suitable example.” (Jun 2025)
“Describe Out-of-Bag Evaluation method with the help of an example.” (Jun 2025)
“What is Ensemble learning? Discuss bagging and boosting techniques with examples.” (Jun 2025)
“What is ensemble learning? Explain the ensemble techniques Max voting, Averaging and Weighted average.” (Dec 2024)
The short answer
Ensemble learning combines several models so that their mistakes cancel out and the group predicts better than any single model. Simple ensembles use max voting, averaging or weighted averaging. Bagging and pasting train models on random samples; stacking trains a final model on the predictions of the others.
Write these points
Basic techniques
Max (hard) voting: each classifier votes; the majority class wins.
Soft voting: average the class probabilities.
Averaging: mean of the predictions (regression or probabilities).
Weighted average: better models get larger weights.
Bagging and pasting
Bagging (bootstrap aggregating): each model trains on a random sample drawn with replacement.
Pasting: samples drawn without replacement.
Models train in parallel; predictions are voted or averaged.
Bagging lowers variance, so it helps unstable models like deep decision trees.
Out-of-bag (OOB) evaluation
With replacement, each bootstrap sample leaves out about 37% of the data ((1 − 1/n)ⁿ → e⁻¹ = 0.368).
Each model is tested on the points it did not see; averaging these gives an OOB score without a separate validation set.
Stacking
Level 0: several different models (tree, SVM, KNN) make predictions.
Level 1: a meta model (often logistic regression) learns how to combine them.
Voting and averaging with three models.
Classes predicted for one e-mail: model 1 spam, model 2 not spam, model 3 spam. Max voting: spam (2 to 1).
Both above 0.5, so the e-mail is spam; the weighted result leans to the best model.
Real-life example
Asking five friends which movie to watch and going with the majority is max voting. Giving more weight to the friend who usually chooses well is weighted averaging.
Figure: bagging and boosting
Same or opposite: bagging and pasting
Point
Bagging
Pasting
Same or opposite
Sampling
With replacement
Without replacement
Opposite
Trains models in parallel
Yes
Yes
Same
OOB evaluation
Possible
Not possible
Opposite
Diversity of models
Higher
Lower
Opposite
Exam tip. Define ensemble learning and its idea. Explain voting, averaging and weighted average with numbers. Then bagging versus pasting, the 37% OOB fact and stacking.
Q5. Random forest, extra trees, random patches and random subspaces
Asked 4 times in 2022, 2023, 2024, 2025 · Unit 4
From the papers
“Describe Random Patches and Random Subspaces with the help of an example.” (Jun 2025)
“Describe the working of random forests and their advantages over decision trees.” (Jun 2025)
“Explain: Random patches and Random subspaces.” (Dec 2024)
“Discuss in detail extra trees. Explain how they differ from random forest.” (Nov 2023)
The short answer
A random forest is an ensemble of decision trees trained by bagging, with one extra twist: at each split a tree looks at only a random subset of features. So the trees differ. Their majority vote (classification) or average (regression) is more accurate and less overfitted than one tree. Extra trees add even more randomness; random patches and random subspaces sample features too.
Write these points
Working
Draw n bootstrap samples from the training data.
Grow a decision tree on each; at every node pick the best split among m random features (m ≈ √p for classification).
Grow trees deep without pruning.
Classification: majority vote. Regression: average of the tree outputs.
Advantages over a single decision tree
Much less overfitting (variance falls).
Higher accuracy; noise and outliers do less harm.
Gives feature importance scores.
Handles many features and missing values; OOB score comes free. Drawback: slower, less easy to read.
Extra trees, random patches and random subspaces
Method
Rows sampled
Features sampled
Split threshold
Random forest
Yes
Yes, at each split
Best
Extra trees (extremely randomized)
Usually no
Yes
Random
Random patches
Yes
Yes, per model
Best
Random subspaces
No (all rows)
Yes, per model
Best
Hyperparameters of random subspace ensembles: number of models, number (or fraction) of features per model, base model type.
Random forest for a house price (regression).
Four trees predict ₹52 lakh, ₹48 lakh, ₹50 lakh and ₹54 lakh.
A single tree might give 54 because it overfitted to a few expensive houses.
Averaging smooths these errors: that is why the forest is more stable.
Real-life example
Asking one doctor may give a biased opinion. A panel of doctors, each looking at different tests, gives a majority view. That panel is a random forest.
Figure: random forest
Same or opposite: decision tree and random forest
Point
Decision tree
Random forest
Same or opposite
Number of models
One
Many trees
Opposite
Uses decision tree splits
Yes
Yes
Same
Overfitting
High
Low
Opposite
Interpretability
Easy
Harder
Opposite
Exam tip. Draw the forest with bootstrap samples and voting. Write the four steps, the advantages over one tree and the table of extra trees, random patches and random subspaces.
“Explain the CURE algorithm with suitable example.” (Nov 2023, Dec 2024)
“Explain the Birch and CURE clustering algorithms and their applications.” (Jun 2025)
“Construct a tree by using BIRCH algorithm for the data set D = {(1,2), (2,4), (3,5), (4,6), (5,6), (5,9), (6,7), (6,8), (7,2), (8,9)}, branching factor B = 3, L = 5 and threshold 2.6.” (Nov 2023)
“Write short note on: BIRCH Algorithm.” (Nov 2022)
The short answer
BIRCH (Balanced Iterative Reducing and Clustering using Hierarchies) clusters very large data sets in one scan by summarizing points into clustering features (CF) stored in a CF tree. CURE (Clustering Using REpresentatives) represents each cluster by several scattered points shrunk towards the centre, so it finds clusters of any shape and resists outliers.
Write these points
BIRCH
CF = (N, LS, SS): number of points, linear sum, sum of squares. CFs add: CF₁ + CF₂ = (N₁ + N₂, LS₁ + LS₂, SS₁ + SS₂).
From a CF: centroid = LS ÷ N; radius R = √(SS ÷ N − ‖LS ÷ N‖²).
CF tree: each non-leaf node has at most B entries (branching factor); each leaf at most L entries; each leaf entry is a sub-cluster whose diameter or radius must stay below the threshold T.
Steps: (1) scan data and insert each point into the closest leaf entry if T allows, else make a new entry; split nodes that overflow. (2) Optionally condense. (3) Run a global clustering (k-means) on the leaf entries. (4) Optionally refine.
CURE
Draw a random sample and partition it.
Cluster hierarchically; each cluster keeps c well scattered representative points.
Shrink representatives towards the centroid by a factor α (0.2 to 0.5); this reduces the effect of outliers.
Merge the two clusters with the closest representatives; repeat.
Label the rest of the data by the nearest representative.
Applications: BIRCH for huge transaction or sensor data; CURE for image segmentation and spatial data with odd shapes.
Clustering feature of three points.
Points (1, 2), (2, 4), (3, 5).
N = 3, LS = (6, 11), SS = 1 + 4 + 4 + 16 + 9 + 25 = 59.
1.49 is below the threshold 2.6, so the three points stay in one leaf sub-cluster; BIRCH stores only (3, (6, 11), 59).
Real-life example
A bank branch sends head office only the daily totals (count, sum and sum of squares of deposits) instead of every slip. BIRCH summarizes points the same way.
Figure: BIRCH phases
Same or opposite: BIRCH and CURE
Point
BIRCH
CURE
Same or opposite
Cluster summary
One CF per sub-cluster
Several representative points
Opposite
Built for large data sets
Yes
Yes
Same
Cluster shapes
Best for round clusters
Any shape
Opposite
Outliers
Sensitive
Robust (shrinking)
Opposite
Exam tip. Define CF with N, LS and SS and the CF tree parameters B, L and T. Write the BIRCH phases, then CURE's representative points and shrinking. Compute one CF and its radius.
“Explain with an example the confusion matrix with precision and recall.” (Dec 2024)
“Considering an example, calculate the classification hierarchy and specify the F1 Score and support.” (Nov 2023)
The short answer
A confusion matrix counts correct and wrong predictions of a classifier: TP (true positive), FP (false positive), TN (true negative) and FN (false negative). From it come accuracy, precision, recall and the F1 score. Support is the number of real samples of each class.
Write these points
Formulas
Metric
Formula
Answers the question
Accuracy
(TP + TN) ÷ total
How often is it right?
Precision
TP ÷ (TP + FP)
Of the predicted positives, how many are real?
Recall (sensitivity)
TP ÷ (TP + FN)
Of the real positives, how many did it find?
F1 score
2PR ÷ (P + R)
Balance of precision and recall
Specificity
TN ÷ (TN + FP)
Of the real negatives, how many were found?
Classification report lists precision, recall, F1 and support for each class.
Accuracy misleads on imbalanced data: 99% "no fraud" gets 99% accuracy while catching nothing.
Precision matters when false alarms are costly (spam); recall when misses are costly (disease).
Report all of them together: a high value of one alone can hide a weak model.
A security guard who stops many innocent people has low precision. One who lets thieves walk past has low recall. A good guard balances both, which is what F1 measures.
Figure: confusion matrix and its measures
Same or opposite: precision and recall
Point
Precision
Recall
Same or opposite
Formula
TP ÷ (TP + FP)
TP ÷ (TP + FN)
Opposite
Uses true positives
Yes
Yes
Same
Hurt by
False positives
False negatives
Opposite
Important for
Spam filter
Disease screening
Opposite
Exam tip. Draw the 2 × 2 matrix with TP, FP, FN and TN. Write the five formulas and solve the given numbers step by step. Say when accuracy misleads.
“Discuss Gradient Boosting with the help of an example.” (Jun 2025)
“What is Bagging and Boosting? Write few differences between them in detail.” (Nov 2022)
“Write short note on: AdaBoost and Gradient boosting.” (Nov 2023, Dec 2024)
The short answer
Boosting trains models one after another; each new model concentrates on the mistakes of the ones before. The final prediction is a weighted combination. It turns many weak learners (a little better than guessing) into a strong one. The two main forms are AdaBoost and gradient boosting.
Write these points
AdaBoost
Give every training sample weight 1 ÷ n.
Train a weak learner (a stump); find its weighted error ε.
Model weight α = ½ ln((1 − ε) ÷ ε).
Raise weights of wrongly classified samples (× e^α), lower the correct ones (× e^−α), normalize.
Repeat; final output = sign(Σ α h(x)).
Gradient boosting
Start with a simple prediction F₀ (for example the mean).
Compute residuals (the negative gradient of the loss): r = y − F.
Fit a small tree to the residuals.
Update F = F + η × tree (η is the learning rate, 0.1).
Repeat for many trees. Fast versions: XGBoost, LightGBM, CatBoost.
Bagging and boosting
Point
Bagging
Boosting
Training
Parallel, independent
Sequential, each fixes the last
Sample weights
Equal
Errors get larger weights
Reduces
Variance
Bias (and variance)
Risk
Little overfitting
Can overfit noisy data
Example
Random forest
AdaBoost, gradient boosting
One AdaBoost round.
10 samples, each weight 0.1. A stump misclassifies 3: ε = 0.3.
Normalized: wrong 0.167 each, right 0.071 each, so the next stump focuses on the three hard samples.
Real-life example
A student who after every test practises only the questions answered wrong improves fastest. Boosting trains each new model on the previous model's mistakes in the same way.
Figure: gradient boosting
Same or opposite: AdaBoost and gradient boosting
Point
AdaBoost
Gradient boosting
Same or opposite
What changes each round
Sample weights
Target becomes the residual
Opposite
Builds models one after another
Yes
Yes
Same
Loss
Exponential
Any differentiable loss
Opposite
Typical learner
Decision stump
Small regression tree
Opposite
Exam tip. Write the AdaBoost steps with α and the weight update, then gradient boosting with residuals. Finish with the bagging versus boosting table and one AdaBoost round.
“Explain the concept of Manifold Learning in Dimensionality Reduction with the help of an example.” (Jun 2025)
“Describe the Projection Approach for Dimensionality Reduction using an example.” (Jun 2025)
“Explain the concept of dimensionality reduction and its importance in machine learning.” (Jun 2025)
“What is the curse of dimensionality? Explain the dimensionality reduction methods with an example.” (Dec 2024)
The short answer
Dimensionality reduction reduces the number of features while keeping the useful information. It fights the curse of dimensionality: as dimensions grow, data become sparse, distances lose meaning and models need far more data and overfit. The two main approaches are projection (for example PCA) and manifold learning (for example LLE).
Write these points
Benefits
Faster training and less memory.
Less overfitting, often better accuracy.
Removes noise and redundant (correlated) features.
Data lie near a flat lower dimensional subspace; project onto it
PCA, LDA
Manifold learning
Data lie on a curved surface (manifold); unroll it
LLE, Isomap, t-SNE, kernel PCA
Projection fails on twisted data such as the Swiss roll: projecting squashes layers together, while manifold learning unrolls it.
Backward elimination
Fit the model with all features.
Find the feature with the highest p-value (least useful).
If it is above the significance level (0.05), remove it.
Refit and repeat until every remaining feature is significant.
Curse of dimensionality in numbers.
To cover a line segment with points every 0.1, we need 10 points.
For a square at the same spacing: 10² = 100 points. For a cube: 1,000.
For 10 features: 10¹⁰ = 10 billion points.
Real data sets are tiny by comparison, so in high dimensions most of the space is empty and nearest neighbours are far away.
Real-life example
A photo of a 3-D room on a 2-D page still shows the room clearly: that is projection. Unrolling a rolled poster to read it is manifold learning.
Figure: dimensionality reduction methods
Same or opposite: projection and manifold learning
Point
Projection
Manifold learning
Same or opposite
Assumes data lie on
A flat subspace
A curved surface
Opposite
Reduces dimensions
Yes
Yes
Same
Example
PCA
LLE, Isomap
Opposite
Swiss roll data
Fails
Works
Opposite
Exam tip. Define the curse of dimensionality with the 10, 100, 1,000 example. List benefits, give the approaches table and explain projection versus manifold learning. Write backward elimination steps if asked.
Q10. Data preprocessing, hypothesis space and the bias-variance trade-off
Asked 4 times in 2022, 2023, 2024, 2025 · Unit 1
From the papers
“Explain the concept of bias-variance trade-off and its significance in machine learning models.” (Jun 2025)
“Explain the role of data pre-processing in ensuring the quality and reliability of machine learning models.” (Dec 2024)
“Explain about distribution of data in terms of hypothesis and hypothesis space in 2D co-ordinate plane with an example.” (Nov 2023)
“Illustrate the major tasks involved in data preprocessing in machine learning.” (Nov 2023)
The short answer
Data preprocessing prepares raw data for learning: cleaning, integration, transformation and reduction. A hypothesis is one candidate function from inputs to outputs; the hypothesis space is the set of all hypotheses a learner can choose from. The bias-variance trade-off says that a model's error comes from being too simple (bias) or too sensitive to the training data (variance).
Write these points
Major tasks in preprocessing
Data cleaning: fill missing values, remove noise and duplicates, fix errors.
Data integration: combine sources, resolve conflicts.
Data transformation: normalization, encoding categories, creating features.
Data reduction: fewer features (PCA) or samples (sampling).
Data augmentation: create extra samples by flipping, rotating or adding noise; split into train and test sets.
Hypothesis space
In 2-D, if data points of two classes sit on a plane, each straight line is one hypothesis; the set of all lines is the hypothesis space.
A consistent hypothesis classifies every training point correctly.
A bigger space (curves) can fit more data but risks overfitting.
High bias: too simple, underfits (a line through curved data).
High variance: too complex, overfits (a degree-15 curve through 20 points).
The best model balances both; regularization, more data and cross-validation help.
Choosing model complexity.
Degree 1 polynomial: training error 30, test error 32 → high bias.
Degree 3: training error 8, test error 10 → good balance.
Degree 15: training error 0.5, test error 45 → high variance.
Degree 3 has the lowest test error, so it generalizes best.
Real-life example
An archer whose arrows all land together but far from the centre has high bias. One whose arrows are scattered around the centre has high variance. The goal is tight and centred.
Figure: data preprocessing tasks
Same or opposite: high bias and high variance
Point
High bias
High variance
Same or opposite
Fit
Underfits
Overfits
Opposite
Raises test error
Yes
Yes
Same
Training error
High
Very low
Opposite
Fix
More complex model, more features
More data, regularization, simpler model
Opposite
Exam tip. List the preprocessing tasks in order. Explain hypothesis space with the 2-D line example. Write the bias-variance formula and the underfit, good, overfit example.
Q11. PCA: principal components, preserving variance, explained variance ratio, randomized, incremental and kernel PCA
Asked 3 times in 2023, 2024, 2025 · Unit 5
From the papers
“What do you mean by Preserving the Variance? Explain using an example.” (Jun 2025)
“Describe PCA for Compression under the Dimensionality Reduction.” (Jun 2025)
“Describe the Principal Component Analysis (PCA) technique and how it is used for feature selection.” (Jun 2025)
“A dataset contains 2000 samples, each with 50 features. Using PCA, we reduce the dimensions to 10. Calculate the percentage of variance retained.” (Jun 2025)
The short answer
Principal component analysis (PCA) finds new axes, the principal components, along which the data vary the most. It then projects the data onto the first few. Each component is an eigenvector of the covariance matrix; its eigenvalue is the variance it carries. Keeping the components that hold most of the variance is called preserving the variance.
Write these points
Steps
Centre each feature (subtract its mean); scale if units differ.
Compute the covariance matrix.
Find eigenvalues and eigenvectors.
Sort by eigenvalue; the explained variance ratio of component i = λᵢ ÷ Σλ.
Keep the smallest k whose cumulative ratio reaches the target (95% or 98%).
Project: Z = X · W_k. For compression, rebuild X ≈ Z · W_kᵀ; the loss is the reconstruction error.
Variants
Randomized PCA: a random projection finds the top k components fast, O(m · k²) instead of full eigen decomposition; good when k is much smaller than the number of features.
Incremental PCA: feeds the data in mini-batches, so huge data sets or streams fit in memory.
Kernel PCA: uses the kernel trick (RBF, polynomial) to find curved components; good for non-linear data.
PCA builds new features (feature extraction); it does not select original ones, but loadings show which features matter.
How many components to keep.
The June 2025 paper gives no eigenvalues, so the answer is the method: retained = sum of the 10 kept eigenvalues ÷ sum of all 50.
With standardized data the total variance equals the number of features, 50. If the top 10 eigenvalues add to 41, retained = 41 ÷ 50 = 82%.
For the 800-dimension question: keep adding components until the cumulative ratio first reaches 0.98; that count is the new dimension.
For MNIST (784 features) a 95% target keeps about 154 components: an 80% size cut with little loss.
Real-life example
A photographer turns a long dining table so its length faces the camera; one shot then shows nearly everything. PCA turns the axes to face the data's longest spread.
Figure: principal components
Same or opposite: PCA and kernel PCA
Point
PCA
Kernel PCA
Same or opposite
Components
Straight (linear)
Curved (non-linear)
Opposite
Reduces dimensions
Yes
Yes
Same
Uses
Covariance matrix
Kernel matrix
Opposite
Cost
Lower
Higher
Opposite
Exam tip. Write the PCA steps with the explained variance ratio. Explain preserving variance and compression, then randomized, incremental and kernel PCA. Solve a variance retained example.
Q12. Logistic regression and decision tree classification
Asked 3 times in 2023, 2024, 2025 · Unit 3
From the papers
“Describe Logistic Regression in detail using suitable example.” (Jun 2025)
“Discuss the working of logistic regression and decision tree classification with suitable examples.” (Jun 2025)
“Discuss in detail logistic regression with an example. Write the types of logistic regression.” (Dec 2024)
“Explain the concept of logistic regression in classification. How does it model the probability of class membership?” (Nov 2023)
The short answer
Logistic regression is a classification method: it computes z = w·x + b and passes it through the sigmoid, P(y = 1 | x) = 1 ÷ (1 + e^−z), giving the probability of class membership. A decision tree classifies by asking a series of feature questions from root to leaf, choosing each split by information gain or Gini index.
Write these points
Logistic regression
Predict class 1 when P ≥ 0.5 (the threshold can change).
Trained by maximizing the log-likelihood (minimizing log loss) with gradient descent.
Types: binary (pass or fail), multinomial (three or more classes without order), ordinal (ordered classes such as low, medium, high).
Coefficients are easy to read: e^w is the change in odds for one unit of x.
Decision tree classification
Start with all data at the root.
For each feature compute the impurity drop: entropy H = −Σ p log₂ p or Gini = 1 − Σ p².
Split on the feature with the highest information gain (or lowest Gini).
Repeat on each branch until nodes are pure or a depth limit is hit.
Advantages: easy to read, no scaling needed, handles numeric and categorical data. Disadvantages: overfits, unstable to small data changes, boundaries are axis-parallel steps, so diagonal or curved boundaries need many splits.
Logistic probability and tree entropy.
Logistic model for passing: z = −4 + 0.5 × hours. For 10 hours: z = 1, P = 1 ÷ (1 + e^−1) = 0.73, so predict pass.
Tree node with 6 yes and 4 no: H = −0.6 log₂ 0.6 − 0.4 log₂ 0.4 = 0.442 + 0.529 = 0.971.
A split giving pure children (6 yes | 4 no) has gain 0.971 − 0 = 0.971, the best possible.
The tree picks that feature at the root.
Real-life example
A doctor asks: fever? then cough? then travel history? and reaches a diagnosis; that is a decision tree. Saying there is a 73% chance of flu is logistic regression.
Figure: building a decision tree
Same or opposite: logistic regression and decision tree
Point
Logistic regression
Decision tree
Same or opposite
Boundary
One straight line (plane)
Axis-parallel steps
Opposite
Used for classification
Yes
Yes
Same
Output
Probability
Class at a leaf
Opposite
Needs scaling
Helps
No
Opposite
Exam tip. Write the sigmoid formula and the three types of logistic regression with an example. Give the tree building steps with entropy and Gini, then advantages and disadvantages.
“Consider a Gaussian Naive Bayes classifier with prior probabilities P(A) = 0.6 and P(B) = 0.4. Given likelihoods P(X|A) = 0.8 and P(X|B) = 0.3, compute P(A|X) using Bayes' theorem.” (Jun 2025)
“Discuss in detail Naive Bayes algorithm. Write the types of Naive Bayes models.” (Nov 2023)
“Consider the given dataset, apply Bernoulli Naive Bayes and predict whether a person has a disease or not based on their age, sex and fever.” (Nov 2023)
“Write short note on: Support Vector Machine.” (Nov 2023, Dec 2024)
The short answer
Naive Bayes classifies with Bayes' theorem, P(C | X) = P(X | C) P(C) ÷ P(X), assuming features are independent given the class. It has three common types: Gaussian, Multinomial and Bernoulli. A support vector machine (SVM) finds the separating hyperplane with the widest margin between classes.
Write these points
Naive Bayes
Choose the class with the largest P(C) × Π P(xᵢ | C).
Gaussian NB: continuous features, each class a normal distribution.
Multinomial NB: counts, such as word counts in text.
Bernoulli NB: yes or no features (word present or not; fever yes or no).
Fast, needs little data, good for text; the independence assumption is rarely true, so probabilities can be off.
Support vector machine
Hyperplane w·x + b = 0; margin = 2 ÷ ‖w‖; maximize it by minimizing ½‖w‖² with yᵢ(w·xᵢ + b) ≥ 1.
Support vectors are the points on the margin; only they decide the boundary.
P(B | X) = 0.12 ÷ 0.60 = 0.2, so X is classified as A.
Real-life example
A doctor who sees fever and rash thinks of measles because measles often shows both and is common in that season. That is Bayes' rule in daily life.
Figure: Naive Bayes classification
Same or opposite: Naive Bayes and SVM
Point
Naive Bayes
SVM
Same or opposite
Approach
Probability
Geometric margin
Opposite
Supervised classifier
Yes
Yes
Same
Training speed
Very fast
Slower on big data
Opposite
Gives probabilities
Yes
Not directly
Opposite
Exam tip. Write Bayes' theorem with the independence assumption and the three types of Naive Bayes. Solve the posterior numerically. Add SVM with margin, support vectors and kernels.
“What do you mean by K-Nearest Neighbors (K-NN) under the Classification algorithm?” (Jun 2025)
“Explain the KNN algorithm with an example.” (Dec 2024)
“Is K-NN algorithm supervised? Explain in detail.” (Nov 2022)
The short answer
K-nearest neighbours (KNN) is a supervised, instance based (lazy) classifier: it stores the training data and, for a new point, finds the k closest training points and takes the majority class among them. For regression it averages their values.
Write these points
Algorithm
Choose k (odd for two classes, often 3 or 5) and a distance (Euclidean).
Compute the distance from the query to every training point.
Take the k nearest.
Classification: majority vote (or distance weighted vote). Regression: mean of the k values.
Points to remember
Yes, KNN is supervised: it needs labelled training points.
No training phase, but prediction is slow for big data.
Scale features first, or large features dominate the distance.
Small k: noisy, overfits. Large k: too smooth, underfits. Pick k by cross-validation.
Distances: A 2.83, B 2.24, C 1.00, D 2.83, E 1.00.
Three nearest: C (Blue), E (Red), B (Red).
Votes: Red 2, Blue 1, so (3, 3) is Red.
Real-life example
A new student picks a hostel mess by asking the three nearest seniors which mess they prefer and going with the majority. That is KNN with k = 3.
Figure: KNN
Same or opposite: KNN and logistic regression
Point
KNN
Logistic regression
Same or opposite
Learning
Lazy: stores data
Eager: learns weights
Opposite
Supervised
Yes
Yes
Same
Prediction time
Slow
Fast
Opposite
Boundary
Any shape
Straight line
Opposite
Exam tip. State that KNN is supervised and instance based. Write the four steps, the effect of k and the need for scaling. Solve a small example with a distance table.
“Discuss the significance of the VC dimension in understanding the generalization ability of learning algorithms.” (Nov 2023)
“Distinguish between PAC and VC with suitable examples.” (Nov 2023)
“Write short note on: VC Dimensions.” (Dec 2024)
“Write short note on: PAC learning.” (Nov 2023)
The short answer
PAC (probably approximately correct) learning asks how many examples a learner needs so that, with probability at least 1 − δ, its error is at most ε. The VC (Vapnik-Chervonenkis) dimension measures the capacity of a hypothesis class: the largest number of points it can shatter (label in every possible way). Together they explain how well a model will generalize.
For a finite hypothesis space H and a consistent learner: m ≥ (1 ÷ ε)(ln |H| + ln(1 ÷ δ)).
A class is PAC learnable if m grows only polynomially in 1/ε, 1/δ and the problem size.
VC dimension
A straight line in 2-D can shatter any 3 points not on one line, but not 4 (the XOR layout fails): VC dimension = 3.
In general, linear classifiers in d dimensions have VC dimension d + 1.
Higher VC dimension means more capacity but more data needed to avoid overfitting.
Sample bound for infinite H: m grows with the VC dimension instead of ln |H|.
How many examples for PAC learning.
|H| = 1,000 hypotheses, ε = 0.1, δ = 0.05.
ln 1,000 = 6.91; ln(1 ÷ 0.05) = ln 20 = 3.00.
m ≥ (1 ÷ 0.1)(6.91 + 3.00) = 10 × 9.91 = 99.1.
So 100 examples guarantee, with 95% confidence, an error of at most 10%.
Real-life example
Before trusting a new cook you taste enough dishes to be fairly sure (δ) that the cooking is mostly good (ε). PAC learning asks how many dishes are enough.
Figure: PAC learning
Same or opposite: PAC learning and VC dimension
Point
PAC learning
VC dimension
Same or opposite
Is
A framework for learnability
A capacity measure
Opposite
Relates to generalization
Yes
Yes
Same
Key quantities
ε, δ, sample size
Largest set shattered
Opposite
Used for
Sample size bounds
Model complexity
Opposite
Exam tip. Define PAC with ε and δ and write the sample bound. Define shattering and VC dimension with the line in 2-D example (VC = 3). Solve one sample size.
RGPV teaches Machine Learning to 3 branches under one syllabus. Each branch prints its own code on the paper, but the units are the same. So one page and one PDF serve all of them.
We counted every question in the Machine Learning papers on this site by topic, from 2022 to 2025. A topic that keeps coming back is a topic RGPV likes, so it sits higher in the table. One branch alone has only a few papers. Counting them together gives a surer list.
Machine Learning important questions by branch
IO-702-DMachine Learning important questions for IOT, Semester 7
IO-702-D follows the same RGPV syllabus as the other codes on this page. The 15 topics and answers above are the IO-702-D important questions too.
Machine Learning is a Semester 7 subject in Internet of Things, under the paper code IO-702-D. Computer Science and Engineering studies the same subject in Semester 6 as CS-601, and its full unit-wise brief is on the Computer Science and Engineering page. In Semester 7 of Internet of Things you study it along with IoT Architecture and Protocal, Data Engineering and Cloud Computing.
Machine Learning is a Semester 7 subject here, one semester after CSE, with IoT Architecture and Protocol and Data Engineering. Units 2 to 4 (neural networks) give the methods, and Data Analytics in IoT in Semester 6 gives sensor data to try them on.
We hold 2 previous year papers for Machine Learning in Internet of Things, from 2023 to 2025. The papers list opens each one, newest first.
Machine Learning units at a glance
Introduction to machine learning
Neural networks and training
Convolutional neural networks
Recurrent neural networks and reinforcement learning
Support vector machines and applications
The unit list follows the RGPV scheme and syllabus, B.Tech Computer Science and Engineering, Semester 6 (AICTE flexible curriculum, w.e.f. Jan 2020). Check your own branch's scheme document if a unit differs. For the topics inside each unit, open the Machine Learning notes.
What are the most important topics in Machine Learning?
By how often they were asked in the papers on this site: Machine learning: life cycle, types, challenges and relation with AI and data science (4 times); Clustering: types, partitioning and hierarchical clustering, dendrogram and applications (4 times); Gaussian mixture models, expectation maximization and parameter estimation (MLE and MAP) (4 times); Ensemble learning: voting, averaging, bagging and pasting, out-of-bag evaluation, stacking (4 times); Random forest, extra trees, random patches and random subspaces (4 times).
How were these Machine Learning important questions chosen?
Each topic was counted from the questions in the past papers listed on this site (2022-2025). Repeated is the number of times the topic came. The counts come from keyword matching and the answers are not teacher-reviewed, so use them together with your syllabus.
Is there a PDF of Machine Learning important questions with answers?
Yes. The Paperwala Imp Question & Answer PDF for Machine Learning is free to download from this page.
The 15 most repeated topics of Machine Learning (IO-702-D) for RGPV B.Tech IOT semester 7, counted from the previous year papers on this site. The same syllabus is taught under 3 codes: IO-702-D, AD-502, CD-502. Machine Learning is also searched for as IS-702-A.