📊 What actually shows up (from your papers)
I read through the papers in your Drive's ML → Previous year question paper folder — 2021 Regular & Makeup, 2023-24 Regular & Makeup, 2024-25 Regular & Makeup, March 2026 Regular & Makeup, plus the official "Sample QP" pattern sheet. One official pattern note was even printed right on a paper — it lines up almost exactly with what I found by hand-counting every question:
| Topic | Typical weight | How often it appeared |
| Bayesian Learning (Naive Bayes, MLE/MAP) | 4–8 marks | Every single paper |
| Instance-based learning (k-NN, locally weighted regression) | 4–8 marks | Every single paper |
| SVM (margin, support vectors, kernels, KKT) | 4–8 marks | Almost every paper |
| Ensemble Learning (Bagging/RF/AdaBoost/GBM) | 4–8 marks | Almost every paper |
| Unsupervised (K-Means, GMM/EM, K-Modes) | 4–8 marks | Most papers |
| Model Evaluation / bias-variance / multicollinearity | 4–8 marks | Most papers |
| Regularization (Ridge/Lasso), Decision Trees + pruning | 3–7 marks | Most recent (2024-26) papers |
Trend to notice: the 2024-25 and March-2026 papers moved from short textbook-style questions to business case-studies (bank/telecom/fintech scenario → compute something). Same underlying math, wordier wrapper. Expect that style tomorrow.
① Bayesian Learning — Naive Bayes High probability tomorrow
Analogy — the office guessing game: Someone walks into your office soaking wet and carrying an umbrella. You didn't see the weather, but you guess it's raining outside. Why? Because "wet + umbrella" is way more common when it rains than when it doesn't. Naive Bayes does exactly this: it looks at each clue (feature) separately, asks "how likely is this clue if the answer were A? What about if the answer were B?", multiplies all the clue-likelihoods together for each candidate answer, and picks whichever answer comes out on top. "Naive" just means it assumes the clues don't affect each other (wetness and umbrella-carrying are judged independently, even though in real life they're related) — it's a simplification that works surprisingly well.
Concept in plain English + the formula
We want P(class | features). Bayes' rule flips this into things we can actually count from training data:
P(class | features) ∝ P(class) × P(feature₁ | class) × P(feature₂ | class) × ...
Two flavours show up in your papers:
Whichever class gives the bigger final product wins. You never need the exact probability — just which side is bigger — so people usually say "∝" (proportional to) and skip the normalizing denominator.
Worked pattern from your papers (mixed Gaussian + categorical) — study hours & gender → Pass/Fail
This exact style appeared in two different papers (2024-25 Makeup, and the sample bank). One numeric feature (Gaussian) + one categorical feature (plain proportion), multiplied together with the prior. The recipe:
Priors: P(class) = (# training rows in that class) / (total rows).
Numeric feature: compute mean & variance of that feature separately for each class, then plug the query's value into the Gaussian formula above for each class.
Categorical feature: just count how often the query's category (e.g. "Male") shows up within each class, as a fraction.
Multiply: P(class)×P(numeric|class)×P(categorical|class) for every class.
Compare: bigger number wins. State the winner clearly — many marks are given just for correctly stating "Predicted class = X" at the end.
🆕 New practice question — try it before you look
An event-planning app wants to predict whether a user will Attend a suggested event, using Age (numeric) and Has Car (Yes/No). Training data:
| Attend? | Age | Has Car |
| Yes | 22 | Yes |
| Yes | 25 | No |
| Yes | 28 | Yes |
| Yes | 24 | Yes |
| No | 30 | No |
| No | 35 | No |
| No | 40 | Yes |
Query: Age = 26, Has Car = Yes. Predict Attend using Gaussian Naive Bayes (population variance, divide by n).
Show full solution
Priors: P(Yes)=4/7=0.5714, P(No)=3/7=0.4286.
Yes-class ages {22,25,28,24}: mean=24.75, variance=Σ(x−μ)²/4 = 18.75/4 = 4.6875.
No-class ages {30,35,40}: mean=35, variance=50/3=16.667.
Gaussian at x=26 for Yes: exponent=−(26−24.75)²/(2×4.6875)=−0.1667 → exp=0.8465; coefficient=1/√(2π×4.6875)=0.1843 → P(26|Yes)=0.1560.
Gaussian at x=26 for No: exponent=−(26−35)²/(2×16.667)=−2.43 → exp=0.0880; coefficient=0.0977 → P(26|No)=0.0086.
Car=Yes fraction: within Yes class, 3 of 4 have car → 0.75. Within No class, 1 of 3 have car → 0.333.
Multiply: P(Yes|X) ∝ 0.5714×0.1560×0.75 = 0.0669. P(No|X) ∝ 0.4286×0.0086×0.333 = 0.00123.
Predicted class: Attend = YES — P(Yes|X) is roughly 54× bigger than P(No|X), driven mostly by the Gaussian term (26 is much closer to the "Yes" age cluster) and reinforced by owning a car.
Seen in: 2024-25 Makeup Q2, 2024-25 Regular Q4, 2023-24 Regular Q1, 2023-24 Makeup Q1, Sample QP Q1
② Instance-Based Learning — k-NN & Locally Weighted Regression High probability tomorrow
Analogy — asking your neighbours for advice: You just moved to a new street and want to guess your house's value. You don't build a formula — you just walk over and ask the k nearest houses what they're worth, then average their answers. If one neighbour's house is literally next door and another is three streets away, you'd trust the next-door one more — that's distance weighting (weight = 1/distance², so very close neighbours dominate). "Locally weighted regression" is the same idea but instead of just averaging, you fit a small straight line through your nearby neighbours to make a smarter local guess.
Concept + the exact recipe your papers use
Normalize first if features have different scales (e.g. Age in years vs Income in ₹). Min-max: x' = (x − min)/(max − min).
Pick a distance measure: Euclidean for pure numeric data. Gower distance when the dataset mixes numeric + categorical + ordinal columns (average the per-attribute distances). Manhattan when explicitly told to use it.
Find the k closest training points to the query.
Vote / average. Plain k-NN classification = majority vote. Plain k-NN regression = mean of the k neighbours' y-values. Weighted k-NN multiplies each neighbour's vote/value by a weight, usually w = 1/d², before combining.
(Locally weighted regression only) Fit ŷ = w₀+w₁x₁+w₂x₂ using only the nearby points, apply one gradient-descent step: w_new = w_old + α·Σ K(d)·(y−ŷ)·x.
🆕 New practice question
A website wants to predict Converted (Yes/No) for a new visitor using (TimeOnSite, PagesViewed). Training data:
| Point | x₁ | x₂ | Class |
| C1 | 1 | 2 | Converted |
| C2 | 2 | 4 | Not Converted |
| C3 | 4 | 1 | Not Converted |
| C4 | 5 | 5 | Not Converted |
| C5 | 2 | 2 | Converted |
Query Q=(2,3). Use distance-weighted 3-NN with kernel K(d)=1/d² and Euclidean distance.
Show full solution
Distances from Q(2,3): C1=√(1+1)=1.414; C2=√(0+1)=1.000; C3=√(4+4)=2.828; C4=√(9+4)=3.606; C5=√(0+1)=1.000.
3 nearest: C2(1.000, Not Converted), C5(1.000, Converted), C1(1.414, Converted).
Weights = 1/d²: w(C2)=1/1²=1, w(C5)=1/1²=1, w(C1)=1/1.414²=0.5.
Score(Converted) = w(C5)+w(C1) = 1 + 0.5 = 1.5. Score(Not Converted) = w(C2) = 1.0.
Predicted: Converted (score 1.5 vs 1.0). Note plain majority vote (2 Converted vs 1 Not) already agrees — always show both the plain-vote and weighted-vote numbers in your answer sheet, examiners give marks for demonstrating the distinction even when the final label doesn't change.
Seen in: March-2026 Regular Q2 & Makeup Q3, 2024-25 Regular Q3, 2021 Makeup Q1, Sample QP (Glasgow Coma Scale question)
③ Support Vector Machines High probability tomorrow
Analogy — the widest road between two rival towns: Imagine two towns (the two classes) and you need to build a straight road (the decision boundary) between them. You don't just draw any road — you draw the widest possible road that doesn't touch either town. The houses right on the edge of each town, touching the road's shoulders, are the support vectors — they're the only houses that matter for deciding where the road goes; houses deep inside a town could be bulldozed and the road wouldn't move. A bigger road width = more confidence that new houses (test points) will land on the correct side.
The 5-line geometric method your papers actually expect
Find the two closest points that belong to opposite classes — these are your support vectors (unless the question already tells you which points they are).
The boundary passes through the midpoint of those two points and is perpendicular to the line joining them.
The direction from one support vector to the other gives you the (unscaled) weight vector w.
Pick the sign of w so that the positive-class support vector gives a positive value, then rescale w and b so both support vectors satisfy y·(w·x+b) = 1 exactly (this is the "canonical form").
Margin width = 2/‖w‖. This should equal the straight-line distance between your two support vectors — great way to sanity-check your own arithmetic in the exam.
🆕 New practice question
Training data: P1(2,3)=+1, P2(3,3)=+1, P3(4,1)=−1, P4(5,1)=−1. Assume only P2 and P3 are support vectors.
Show full solution
Distance P2–P3 = √((4−3)²+(1−3)²) = √5 = 2.236 (check: this is smaller than any other cross-class pair, confirming they're the support vectors).
Midpoint = ((3+4)/2, (3+1)/2) = (3.5, 2).
Direction P2→P3 = (4−3, 1−3) = (1,−2). Try w=(1,−2): f(P2)=1(3)−2(3)=−3 → wrong sign (P2 should be positive). Flip: w=(−1,2), and solve b from the midpoint lying on the boundary: −1(3.5)+2(2)+b=0 → b=−0.5.
Check: f(P2)=−3+6−0.5=2.5 (positive ✓), f(P3)=−4+2−0.5=−2.5 (negative ✓). Now rescale so y·f=1: scale factor = 1/2.5 = 0.4. So w=(−0.4, 0.8), b=−0.2.
‖w‖=√(0.16+0.64)=√0.8=0.894. Margin width = 2/0.894 = 2.236 — matches the P2–P3 distance from step 1. ✅ arithmetic confirmed.
Decision function: f(x) = −0.4x₁ + 0.8x₂ − 0.2. A new point is class +1 if f(x)>0, else −1.
Other SVM sub-topics that have appeared (skim these)
- Soft margin / slack variables: used when data isn't perfectly separable; parameter C trades off margin width vs misclassification penalty. High C = fits training data tightly (risk of overfitting); low C = wider margin, tolerates more errors.
- KKT conditions / Lagrangian duals: a point is a support vector exactly when its Lagrange multiplier αᵢ > 0. Points with αᵢ=0 don't affect the boundary at all — this is "complementary slackness," not a bug in the solver.
- Kernel trick: when data isn't linearly separable in the original space, a kernel like K(x,z)=(xᵀz+c)^d (polynomial) or K(x,z)=exp(−‖x−z‖²/2σ²) (RBF/Gaussian) implicitly maps points to a higher dimension where a straight line CAN separate them — without ever computing the mapping explicitly.
Seen in: March-2026 Regular Q5 & Q7, 2023-24 Makeup Q2, Sample QP Q2, 2021 papers Q2
④ Ensemble Learning — Bagging / Random Forest / Boosting High probability tomorrow
Analogy — asking a panel instead of one doctor: One doctor might misdiagnose you, but if you ask 5 independent doctors and go with the majority opinion, you're far less likely to be wrong overall — as long as the doctors aren't all making the same mistake. Bagging gets diversity by giving each doctor a slightly different (randomly resampled) set of patient records to learn from. Random Forest goes further — it also blindfolds each doctor to a random subset of symptoms, forcing them to develop different specialities. AdaBoost is different: it's like a study group where after every round, the group specifically drills the questions everyone got wrong — each new "weak learner" focuses more on the previously-misclassified cases.
The three calculations that repeat every year
A) Majority-vote ensemble accuracy/error — if you combine n independent classifiers each with accuracy p, and majority wins:
P(ensemble correct) = Σ (for k = majority-threshold to n) C(n,k) · pᵏ · (1−p)ⁿ⁻ᵏ
B) AdaBoost weight update — given current weights wᵢ and a weak learner's right/wrong calls:
Weighted error ε = Σ wᵢ over misclassified points only.
Learner's voting power α = ½ ln((1−ε)/ε).
New weight for each point: multiply by e^{−α} if correctly classified (weight shrinks), or e^{+α} if misclassified (weight grows).
Renormalize all weights so they sum to 1.
C) Random Forest vs Bagging — the one extra sentence examiners want: Random Forest adds feature subsampling at every split (not just row subsampling like Bagging), which decorrelates the trees further and reduces variance more.
🆕 New practice question — part A (majority voting)
5 independent classifiers each have accuracy 0.6. Predictions are combined by majority vote. What is the ensemble's accuracy?
Show solution
Need at least 3 of 5 correct (p=0.6):
P(3)=C(5,3)(0.6)³(0.4)²=10×0.216×0.16=0.3456
P(4)=C(5,4)(0.6)⁴(0.4)¹=5×0.1296×0.4=0.2592
P(5)=(0.6)⁵=0.0778
Ensemble accuracy = 0.3456+0.2592+0.0778 ≈ 68.3% — a solid +8.3 point jump over any single classifier, purely from combining independent votes. Always finish this kind of question with one line like this comparing it back to the individual accuracy — that's usually where the last mark is hiding.
🆕 New practice question — part B (AdaBoost)
4 samples with current weights [0.2, 0.1, 0.4, 0.3], true labels [+1,+1,−1,−1]. A weak learner predicts [+1,−1,−1,+1] (so samples 2 and 4 are misclassified). Find ε, α, and the renormalized new weights.
Show solution
ε = w₂+w₄ = 0.1+0.3 = 0.4.
α = ½ ln(0.6/0.4) = ½ ln(1.5) = ½(0.405) = 0.203.
Correct samples (1,3) ×e⁻⁰·²⁰³=0.816: w1=0.2×0.816=0.163, w3=0.4×0.816=0.327.
Wrong samples (2,4) ×e⁺⁰·²⁰³=1.225: w2=0.1×1.225=0.122, w4=0.3×1.225=0.368.
Sum=0.163+0.122+0.327+0.368=0.980 → normalize by dividing each by 0.980.
New weights ≈ [0.167, 0.125, 0.333, 0.375] — notice sample 4 (already the heaviest, and misclassified again) grows the most: AdaBoost is telling the next weak learner "focus hardest on sample 4."
Seen in: March-2026 Regular Q3 & Makeup Q4, 2024-25 Regular Q6b, Sample QP Q4
⑤ Unsupervised Learning — K-Means & GMM/EM Moderate-high probability
Analogy — sorting a mixed bag of candy without labels: Someone dumps a bag of mixed candy on the table and says "sort these into 2 groups, no labels given." You'd naturally pick 2 rough "centers," put each candy in whichever group it's closest to, then recompute the center of each pile, and repeat. That's exactly K-Means. The catch: K-Means forces every candy into exactly ONE pile, even if it's kind of in between. GMM (Gaussian Mixture Model) is the more open-minded version — instead of a hard decision, it gives each candy a percentage belief of belonging to each pile (e.g. "70% pile A, 30% pile B"), and also lets each pile have its own "shape" (spread), not just a center point.
The K-Means "one iteration" recipe
Compute the distance from every point to every current centroid.
Assign each point to its nearest centroid (hard assignment).
Recompute each centroid as the mean of the points now assigned to it.
(If asked for multiple iterations) repeat until centroids stop moving.
GMM's E-step/M-step is the same idea but soft: E-step computes a "responsibility" γ (a probability, using the Gaussian density formula from the Naive Bayes section, for each point-cluster pair); M-step recomputes each cluster's mean, variance, and mixing weight as a weighted average using those responsibilities instead of hard 0/1 membership.
🆕 New practice question
Points: A(1,1), B(1,2), C(4,4), D(5,5), E(4,5). Initial centroids: C1=(1,1), C2=(5,5). Run one K-Means iteration.
Show solution
A(1,1): d(C1)=0, d(C2)=5.66 → Cluster 1. B(1,2): d(C1)=1, d(C2)=5.0 → Cluster 1.
C(4,4): d(C1)=4.24, d(C2)=1.41 → Cluster 2. D(5,5): d(C1)=5.66, d(C2)=0 → Cluster 2. E(4,5): d(C1)=5.0, d(C2)=1.0 → Cluster 2.
New centroid 1 = mean of {A,B} = (1, 1.5).
New centroid 2 = mean of {C,D,E} = (4.33, 4.67).
Cluster 1 = {A,B}, new centroid (1, 1.5). Cluster 2 = {C,D,E}, new centroid (4.33, 4.67). If asked "has it converged?" — run one more iteration with these new centroids; if no point switches clusters, it has converged.
Seen in: March-2026 Regular Q6, 2023-24 Makeup Q4 (K-Modes variant), Sample QP Q3 (GMM/EM)
⑥ Model Evaluation & Comparison Moderate-high probability
Analogy — a smoke detector: Precision asks: "of all the times the alarm went off, how often was there actually a fire?" (avoiding false alarms matters). Recall asks: "of all the actual fires, how many did the alarm catch?" (avoiding missed fires matters). You can't always max out both — a hyper-sensitive detector catches every fire (high recall) but also screams at burnt toast constantly (low precision). Which one matters more depends on the cost of each type of mistake — that's the exam's favourite follow-up question ("which is more important here, and why?").
The 4 formulas + one worked confusion matrix
Accuracy = (TP+TN) / (TP+TN+FP+FN)
Precision = TP / (TP+FP) "of predicted positives, how many were right"
Recall = TP / (TP+FN) "of actual positives, how many did we catch"
F1 = 2 · Precision · Recall / (Precision + Recall)
Rule of thumb for "which matters more" questions: if missing a positive case is costly/dangerous (disease, fraud, spam that hides an important email) → prioritize Recall. If a false alarm is costly/annoying (flagging a genuine email as spam, wrongly accusing someone) → prioritize Precision.
🆕 New practice question
A fraud-detection model gives this confusion matrix on 200 transactions: TP=80, FP=20, FN=10, TN=90. Compute Accuracy, Precision, Recall, F1.
Show solution
Accuracy = (80+90)/200 = 0.85
Precision = 80/(80+20) = 0.80
Recall = 80/(80+10) = 0.889
F1 = 2×0.80×0.889/(0.80+0.889) = 1.422/1.689 = 0.842
Since this is fraud detection, missing an actual fraud (FN) is usually more costly than a false alarm (FP) — so Recall (0.889) being high is reassuring, but you'd still tell the bank "10 real frauds were missed; consider lowering the classification threshold to catch more, accepting a few extra false alarms."
Other Model Evaluation talking points seen in your papers
- Multicollinearity (two input features highly correlated, e.g. "call minutes" & "number of calls"): doesn't hurt predictions much, but wrecks interpretability — coefficients become unstable/misleading. Fix: drop one feature, combine them, or use Ridge (L2) regularization.
- Learning-rate-too-high in gradient descent: spotted from a cost-function curve that diverges/oscillates instead of smoothly decreasing.
- Classification threshold shift (e.g. 0.5 → 0.9): raising the threshold → fewer positive predictions → Recall drops, Precision rises (fewer false alarms, but more missed positives).
Seen in: 2024-25 Regular Q2, 2023-24 Regular Q3 & Q2, 2024-25 Makeup Q1c, Sample QP for students
⑦ Regularization & Bias-Variance (Ridge/Lasso) Appeared in recent papers
Analogy — a dog on a leash: A model's weights are like a dog exploring a park. With no leash (λ=0), the dog runs wild, chasing every squirrel (every tiny quirk in the training data) — that's overfitting / high variance. A very short, tight leash (λ huge) barely lets the dog move at all — it stays near you no matter what, ignoring even genuinely interesting things — that's underfitting / high bias. The right leash length lets the dog explore usefully without running off a cliff. λ is the leash length.
Ridge vs Lasso — the one-line difference that gets asked every year
Ridge (L2): penalty = λΣw². Shrinks weights smoothly toward zero, but never exactly to zero — every feature stays in the model, just weakened. Good when many features are all a little useful and correlated.
Lasso (L1): penalty = λΣ|w|. Can push weights exactly to zero → performs automatic feature selection. Good when you believe only a handful of features actually matter (sparse model).
🆕 New practice question
Data (x,y): (1,2), (2,3), (3,5). Fit y=wx (line through the origin) minimizing J(w)=Σ(y−wx)² + λw². Find w for λ=0, λ=5, and λ=50.
Show solution
Take dJ/dw=0 → w = Σxy / (Σx² + λ).
Σxy = 1(2)+2(3)+3(5) = 2+6+15 = 23. Σx² = 1+4+9 = 14.
λ=0: w = 23/14 = 1.643 (plain least squares — no shrinkage).
λ=5: w = 23/19 = 1.211 (mild shrink).
λ=50: w = 23/64 = 0.359 (heavy shrink — model barely trusts x anymore).
As λ grows, w shrinks toward 0 — exactly the "leash" analogy. At λ=0 you get low bias/high variance; at λ=50 you get high bias/low variance. There's no single "right" λ in general — it's chosen by validation performance.
Seen in: March-2026 Makeup Q1, Sample QP (Lasso regularization question)
⑧ Decision Trees — Overfitting & Pruning Frequently a sub-part
Analogy — memorizing vs understanding for an exam: A tiny decision tree is like a student who only learns 2 broad rules — okay but misses nuance. A giant, unpruned tree is like a student who memorizes the exact wording of every practice question, including typos — they'll ace the practice set (training accuracy near 100%) but fall apart the moment the real exam phrases something slightly differently (test accuracy drops). Pruning is forcing the student to stop memorizing and instead learn general rules that transfer.
Key facts your papers keep testing
- Training accuracy is NOT an unbiased estimate of true accuracy — the tree has already "seen the answers."
- More nodes/depth → training accuracy keeps climbing, but test accuracy rises, peaks, then falls — the peak is the sweet spot to pick.
- Pre-pruning strategies (stop the tree early): max depth limit, minimum samples required to split a node, maximum number of leaf nodes, minimum information-gain/Gini-improvement threshold to allow a split.
- Gini impurity of a child node vs its parent: a good split always makes children purer, so child Gini is generally lower than the parent's, never higher (a common "True/False" trap).
🆕 New practice question
Four trees of increasing size were trained. Their accuracies: 5 nodes → train 70%/test 68%; 10 nodes → train 82%/test 80%; 20 nodes → train 91%/test 74%; 50 nodes → train 99%/test 65%. Which tree would you deploy, and why? Name 2 pre-pruning strategies you'd use to get that size automatically.
Show solution
Deploy the 10-node tree — it has the highest test accuracy (80%). Beyond 10 nodes, training accuracy keeps rising but test accuracy falls (91%→74%→99%/65%) — a textbook overfitting curve. Two pre-pruning strategies to enforce this automatically: (1) set max_depth or max_leaf_nodes so the tree can't grow past roughly this size, and (2) set a minimum information-gain threshold so splits that don't meaningfully help are rejected.
Seen in: 2024-25 Regular Q1, 2024-25 Makeup Q1a & Q8, 2023-24 Regular Q2a
📎 30-second formula sheet
Naive Bayes (Gaussian)
P(x|c)=1/√(2πσ²)·e^(−(x−μ)²/2σ²)
Naive Bayes (Laplace smoothing)
P(w|c)=(count+1)/(total+|V|)
Weighted k-NN
weight = 1/d², sum weights per class
SVM margin
margin = 2/‖w‖, canonical: y(w·x+b)=1
AdaBoost
α=½ln((1−ε)/ε), wrong×e^α, right×e^(−α)
Majority vote
P(correct)=Σ C(n,k)pᵏ(1−p)ⁿ⁻ᵏ for k≥majority
Precision / Recall / F1
TP/(TP+FP) · TP/(TP+FN) · 2PR/(P+R)
Ridge closed-form (1D, through origin)
w=Σxy/(Σx²+λ)
K-Means
assign → nearest centroid → recompute mean → repeat
Gower distance
average of per-attribute distances (numeric: normalized |diff|; categorical: 0/1 match)
Built from your Drive files: 2021/2023-24/2024-25/March-2026 Regular & Makeup papers, and the Sample QP pattern sheet. Good luck tomorrow — you've got this. 💪