PCCST503Semester 5

Machine Learning

Computer Science and Engineering

Earlier codes: CS467, AMT305, CST413

Released early, below our usual bar

Study the top 12 topicsabout 45/60 on past papersRandom picks: 38/60

Below our usual bar: on past papers this ranking beat random picks by about 8 points; we normally require it to beat them by 10 points. Released early by the site owner before the 1 Dec 2026 exam. Use it as a rough priority and cover every module.

On the official model paper (not a real exam; not used to rank): 65% of marks vs 59% for random picks, when studying 50% of the syllabus.

On the newest paper this ranking is about even with random picks. Cover every module.

Topics, ranked

Study from the top. The bar shows how often each topic was asked.

By module

Order

  1. 1

    Linear SVM: Hyperplane & Maximum Margin

    Must doModule 3asked in 9 of 9 papersNotes p. 3–19 (opens in a new tab)

    Short note
    • A linear SVM finds the hyperplane w.x + b = 0 that separates two classes with the maximum margin.
    • The margin lies between the planes w.x + b = +1 and w.x + b = -1 through the nearest points. Its width is 2 / |w|, so maximising the margin means minimising |w|.
    • Constraint for every point: y_i (w.x_i + b) >= 1, with y_i = +1 or -1. Predict the sign of w.x + b.
    • Support vectors are the points closest to the hyperplane. Only they define it, and removing other points changes nothing.
    • Soft margin allows some errors, controlled by C. A large C allows few errors but a narrower margin.

    For detail: Notes pages 3–19 (opens in a new tab)

    21 past questions
    1. Model paper, 3 marksFor a hyperplane wᵀx + b = 0 with w = (3, 4), find the width of the margin and the distance of the point (2, 2) from the hyperplane when b = −5.
    2. Model paper, 4 marksb) A credit data set has positive points (3, 1), (3, −1), (6, 1), (6, −1) and negative points (1, 0), (0, 1), (0, −1), (−1, 0). Find the maximum-margin hyperplane, the support vectors and the margin, and verify with the dual. (4)
    3. Model paper, 3 marksc) A soft-margin SVM has w = (1, 1) and b = −3. For the points A (3, 2) y = +1, B (1, 1) y = −1, C (2, 1.5) y = +1, D (2, 2) y = −1 and E (4, 3) y = +1, find the slack of each point, classify each as outside the margin, inside the margin, or misclassified, and compute the objective for C = 1 and C = 10. (3)
    4. Jun 2026, 3 marksDifferentiate between Hard margin and soft margin SVM.
    5. Jun 2026, 14 marksa) Describe the process of finding the maximum margin hyperplane in SVM classification. (7) b) Explain how the kernel trick allows SVMs to handle non-linearly separable data. List any four types of Kernels used in SVM. (7)
    6. May 2025, 3 marksGive the equation for soft margin classification and the constraints on it.
    7. May 2025, 14 marksa) State the mathematical formulation of the SVM problem. (8) b) How do you find a hyperplane for non-linear data in SVM? (6)
    8. 2025, 3 marksDefine support vectors and list any two properties of the support vector
    9. 2025, 3 marksSuppose that you have a linear support vector machine (SVM) binary classifier. Consider a point that is currently classified correctly, and is far away from the decision boundary. If you remove the point from the training set, and re-train the classifier, will the decision boundary change or stay the same? Justify your answer.
    10. 2025, 8 marksState the mathematical formulation of the SVM problem. Give an outline of the method for solving the problem
    11. 2025, 8 marksDescribe soft-margin SVM with neat diagram. Differentiate between hard-margin SVM and soft-margin SVM.
    12. 2025, 6 marksDerive the equation for margin between support vectors in SVM?
    13. Nov 2024, 14 marksDescribe the significance of soft margin hyper plane and optimal separating hyper plane and explain how they are computed.
    14. Jun 2024, 8 marksExplain the Optimal Separating Hyperplane, SVM Classifier and soft Margin Hyperplane, in detail.
    15. Jun 2024, 10 marksUsing the SVM algorithm, find the SVM classifier for the following data. (Figure: Table Example no, x1, x2, Class: 1, 2, 1, +1; 2, 4, 3, -1)
    16. Dec 2023, 3 marksDerive the equation for margin between support vectors in SVM?
    17. Dec 2023, 8 marksDescribe soft-margin SVM with neat diagram.
    18. Dec 2022, 3 marksWhat is a meant by maximum margin hyperplane?
    19. Dec 2022, 3 marksWhat are the disadvantages of using SVM.
    20. Dec 2022, 8 marksGiven a set of positively labelled data points { (6,2), (6,-2), (12,2), (12,-2) } and negatively labelled data points { (2,0), (0,2), (0,-2), (-2,0) }. Identify the maximum margin hyperplane. Also, sketch the maximum margin hyper plane using a graph.
    21. Dec 2022, 8 marksState the mathematical formulation to express Soft Margin as a constraint optimization problem.
  2. 2

    Classification Evaluation: Confusion Matrix, Precision, Recall, Accuracy, F-Measure, ROC & AUC

    Must doModule 2asked in 9 of 9 papersNotes p. 32–40 (opens in a new tab)Module 4 notes p. 13–19 (opens in a new tab)

    Short note
    • Confusion matrix counts TP, FP, FN, TN. Accuracy = (TP + TN) / (TP + TN + FP + FN). Error rate = 1 - Accuracy.
    • Precision = TP / (TP + FP). Recall (sensitivity) = TP / (TP + FN). Specificity = TN / (TN + FP).
    • F1 = 2 * Precision * Recall / (Precision + Recall), the harmonic mean of precision and recall.
    • ROC curve plots TPR (recall) against FPR = FP / (FP + TN) at different thresholds. AUC is the area under it. 1 is perfect, 0.5 is random guessing.
    • Accuracy misleads on imbalanced data, so prefer precision, recall and F1 there.

    For detail: Notes pages 32–40 (opens in a new tab), Module 4 notes pages 13–19 (opens in a new tab)

    17 of 19 past questions (others unreadable)
    1. Model paper, 4 marksc) A fraud-detection logistic regression is tested on 10,000 transactions, of which 100 are fraud. (a) A trivial model predicts "not fraud" always. (b) The trained model catches 70 frauds but also flags 140 genuine transactions. Compare the two using accuracy, precision, recall and F1, and explain what happens when the threshold is lowered. (4)
    2. Model paper, 4 marksc) A screening model on 10,100 samples has TPR = 0.8 and FPR = 0.05. Compare the precision when the data set has (a) 100 positives and 10,000 negatives, and (b) 5,050 of each class. Explain why ROC curves can look good while precision is poor. (4)
    3. Jun 2026, 14 marksa) Given the following multi-class confusion matrix for a fruit classification system: (Figure: rows Actual, columns Predicted (Apple, Orange, Banana): Apple 120, 15, 5; Orange 10, 95, 5; Banana 5, 10, 85) Calculate Sensitivity, Specificity, Accuracy and F-measure. (8) b) Define the following performance metrics: i) Precision ii) Recall iii) F1-score iv) Accuracy. (6)
    4. May 2025, 3 marksExpress the meaning of corner points in an ROC curve.
    5. May 2025, 14 marksa) Define various performance metrics of a machine learning model. (6) b) Calculate accuracy, recall and precision from the following data. (3) (Figure: Confusion matrix, rows Predict, columns Actual: Predict Yes: Actual Yes 50, Actual No 30; Predict No: Actual Yes 20, Actual No 180) c) What is cross validation and mention the benefits of using cross validation in a machine learning model? (5)
    6. 2025, 3 marksSuppose there are three classifiers A, B and C. The (FPR, TPR) measures of the three classifiers are as follows - A (0, 1), B (1, 1), C (1, 0.5). Identify a perfect classifier for this problem and Justify your answer.
    7. 2025, 8 marksState ROC space and ROC curve in machine learning? In ROC space, which points correspond to perfect prediction, always positive prediction and always negative prediction? Why?
    8. 2025, 6 marksSuppose the dataset had 9700 cancer-free images from 10000 images from cancer patients. Find precision, recall and accuracy? Is it a good classifier? Justify. (Figure: Confusion table, rows actual class, columns predicted: cancer=yes row: 90, 210, total 300; cancer=no row: 140, 9560, total 9700; column totals: 230, 9770, 10000)
    9. 2025, 8 marksSuppose 10000 patients get tested for flu; out of them, 9000 are actually healthy and 1000 are actually sick. For the sick people, a test was positive for 620 and negative for 380. For the healthy people, the same test was positive for 180 and negative for 8820. Construct a confusion matrix for the data and compute the accuracy, precision and recall for the data. Also construct the ROC curve.
    10. 2025, 6 marksSuppose there are three classifiers X, Y, and Z. The (FPR, TPR) measures of the three classifiers are as follows: Classifier X: (0, 0.9), Classifier Y: (0.5, 0.75), Classifier Z: (0, 1). Which of these classifiers can be considered the best, and why?
    11. Nov 2024, 3 marksWhat are the different methods for measuring classifier performance.
    12. Nov 2024, 10 marksWhat are ROC space and ROC curve in machine learning? In ROC space which point corresponds to perfect prediction, always positive prediction and always negative prediction? Why?
    13. Jun 2024, 3 marksLet there be 10 balls (6 white & red balls) in a box and let it be required to pick up the red balls from them suppose we picked 7 balls as the red balls. What are the values of precision, recall, accuracy and f-measure?
    14. Dec 2023, 3 marksCalculate F measure from the following table. Consider Healthy as positive class. (Figure: Table, rows = Prediction, columns = Actual (Deceased leaf, Healthy leaf): Prediction Healthy leaf: 45, 18; Prediction Deceased leaf: 12, 25)
    15. Dec 2023, 4 marksWhat is the significance of ROC curve in machine learning?
    16. Dec 2022, 8 marksConsider a two-class classification problem of predicting whether a photograph contains a man or a woman. Suppose we have a test dataset of 10 records with expected outcomes and set of predictions from our classification algorithm. (Figure: Table Expected -> Predicted: 1 Man->Woman; 2 Man->Man; 3 Woman->Woman; 4 Man->Man; 5 Woman->Man; 6 Woman->Woman; 7 Woman->Woman; 8 Man->Man; 9 Man->Woman; 10 Woman->Woman) Compute the confusion matrix for the data. Also, compute the accuracy, precision, recall, specificity and f-score.
    17. Dec 2022, 8 marksGiven the following data, construct the ROC curve of the data. Compute the AUC. (Figure: Table Threshold, TP, TN, FP, FN: 1: 0,25,0,29; 2: 7,25,0,22; 3: 18,24,1,11; 4: 26,20,5,3; 5: 29,11,14,0; 6: 29,0,25,0; 7: 29,0,25,0)
  3. 3

    Parameter Estimation: MLE, MAP & Bayesian Formulation

    Must doModule 1asked in 9 of 9 papersNotes p. 36–42 (opens in a new tab)

    Short note
    • MLE picks the parameter that makes the observed data most likely: theta_MLE = argmax P(D | theta). It uses only the data.
    • Steps: write the likelihood L(theta), take the log, differentiate, set it to zero and solve.
    • Coin example: 7 heads in 10 flips, L = theta^7 (1 - theta)^3, so theta_MLE = 7/10 = 0.7.
    • MAP combines the data with a prior: theta_MAP = argmax P(D | theta) P(theta). Posterior is proportional to likelihood * prior.
    • Full Bayesian estimation keeps the whole posterior distribution instead of one value. MAP equals MLE when the prior is uniform.

    For detail: Notes pages 36–42 (opens in a new tab)

    20 past questions
    1. Model paper, 3 marksA coin gives 7 heads in 10 tosses, and the prior is Beta(2, 2). Find the MAP estimate.
    2. Model paper, 2 marksa) Observations x1, …, xn come from Uniform(0, θ), and the largest value is 7. Find the MLE of θ, and say whether it is biased. (2) (Figure: subscripts/θ not legible in print, inferred)
    3. Model paper, 3 marksb) Derive the MLE of the mean and variance of a Gaussian sample. Apply it to the response times 2, 4, 4, 4, 5, 5, 7, 9 ms. (3)
    4. Model paper, 4 marksc) Show that MAP estimation with a Gaussian prior on regression weights is ridge regression. Then, for the model y = wx + ε with ε ~ N(0, 1), prior w ~ N(0, 1) and data (x, y) = (1, 2), (2, 3), compare the MLE and MAP. (4)
    5. Jun 2026, 3 marksWhy MAP estimation might be preferred over MLE.
    6. Jun 2026, 14 marksa) Explain Special cases of MLE. (5) b) Estimate the parameter 'λ' of Poisson density function using MLE method. (9)
    7. May 2025, 14 marksa) Assume that the data follows univariate normal distribution with unknown mean and known variance. Find the Maximum likelihood for the parameter mean, given the data are independent and identically distributed. (6) b) Find the maximum a posterior estimate for the parameter mean in the above problem. (Prior probability of the mean itself is normal distribution with mean γ and variance β²) (8)
    8. 2025, 3 marksA coin is tossed 100 times and lands heads 62 times. What is the maximum likelihood estimate for theta, the probability of heads.
    9. 2025, 3 marksCompute the ML estimate for the parameter lambda in the Poisson distribution whose probability function is: f(x) = e^(-lambda) lambda^x / x!, x=0,1,2,...
    10. 2025, 10 marksSuppose that X is a discrete random variable with the following probability mass function: where 0<=theta<=1 is a parameter. The following 10 independent observations were taken from such a distribution: (3, 0, 2, 1, 3, 2, 1, 0, 2, 1). What is the MLE of theta? (Figure: Table: X = 0, 1, 2, 3; P(x) = 2theta/3, theta/3, 2(1-theta)/3, (1-theta)/3)
    11. 2025, 7 marksConsider the geometric distribution, which has p.m.f P(X=k) = (1-theta)^(k-1) theta. Assume that an i.i.d data are drawn from that distribution. i. Write an expression for the log-likelihood of the data as a function of the parameter theta. ii. Find the MLE of theta. iii. Let theta has a beta prior distribution. What is posterior distribution of theta.
    12. 2025, 3 marksDifferentiate between Maximum Likelihood Estimation (MLE) and Maximum A Posteriori (MAP).
    13. Nov 2024, 3 marksExplain the general MLE method for estimating the parameters of a probability distribution.
    14. Nov 2024, 8 marksCompute the maximum likelihood estimate for the parameter lambda in the Poisson distribution whose probability function is f(x) = e^(-lambda) lambda^x / x!
    15. Nov 2024, 6 marksExplain the general MLE method for estimating the parameters of a probability distribution.
    16. Jun 2024, 3 marksDifference between MLE & MAP.
    17. Jun 2024, 6 marksExplain Special cases of MLE.
    18. Dec 2023, 3 marksConceptualise Maximum A-priori Estimation.
    19. Dec 2023, 9 marksSuppose the dataset (x1,x2,...xn) are independent and identically distributed drawn from exponential distribution exp(λ). Find the maximum likelihood of λ
    20. Dec 2022, 6 marksHow to estimating the parameters of a probability distribution using the general MLE method for
  4. 4

    Partitional Clustering: K-Means

    Must doModule 4asked in 8 of 9 papersNotes p. 9–11 (opens in a new tab)

    Short note
    • K-means partitions n objects into k clusters by minimising the squared error E = sum over clusters, sum over x in C_i of |x - m_i|^2, where m_i is the cluster mean.
    • Steps: pick k initial centres, assign each point to its nearest centre, recompute each centre as the cluster mean, repeat until assignments stop changing.
    • Complexity is O(nkt) for n objects, k clusters and t iterations. It ends at a local optimum, so results depend on the initial centres.
    • Weaknesses: k must be given in advance, it needs a defined mean, it is sensitive to outliers, and it suits only compact, similar-sized, roughly spherical clusters.
    • EM is a soft version of K-means: each object gets a membership probability for every cluster instead of a hard assignment.

    For detail: Notes pages 9–11 (opens in a new tab)

    12 past questions
    1. Jun 2026, 3 marksWrite down the major differences between K-means clustering and hierarchical clustering.
    2. Jun 2026, 8 marksb) Apply K-means algorithm to partition the below dataset into two clusters. A(1,1), B(2,3), C(4,6), D(2,4), E(5,3). Take the initial centroid of two clusters as (1, 1) and (2, 4). Use Euclidian distance metric. Perform up to a maximum of one relocation. Show your step by step work. (8)
    3. May 2025, 14 marksa) Write the algorithm for K-means clustering. (6) b) Consider 10 points A1(2,5), A2(2,3), A3(4,5), A4(4,2), A5(6,5), A6(8,9), A7(2,1), A8(4,3), A9(1,6) and A10(3,7). Find 3 clusters after 2 epochs considering A1, A4 and A6 as the initial cluster centres. Use Euclidean distance as the distance function. (8)
    4. 2025, 3 marksIllustrate the strength and weakness of k-means algorithm.
    5. 2025, 10 marksFor the given data, compute two clusters using K-means algorithm for clustering where initial cluster centers are (1, 1) and (5, 7). Execute for two iterations. (Figure: Table: x = 1, 1.5, 3, 5, 3.5, 4.5, 3.5; y = 1, 2, 4, 7, 5, 5, 4.5)
    6. Nov 2024, 6 marksIllustrate the strength and weakness of the K-means algorithm.
    7. Nov 2024, 10 marksUse K-means clustering to cluster the following data into two groups. Assume cluster centroid are m1=2 and m2=4. The distance function used is Euclidian distance {2, 4, 10, 12, 3, 20, 30, 11, 25}.
    8. Jun 2024, 3 marksWhat is clustering? What are the different types of clustering methods?
    9. Jun 2024, 8 marksUse the k-means algorithm to find 2 clusters in the following data: (Figure: Table No 1-7, x1: 1.0, 1.5, 3.0, 5.0, 3.5, 4.5, 3.5; x2: 1.0, 2.0, 4.0, 7.0, 5.0, 5.0, 4.5)
    10. Dec 2023, 8 marksUse K-means clustering algorithm for the following data of heights and weights. Choose the first two data points as initial cluster centres. Use Euclidean distance measure and identify the cluster centre in the second iteration. (Figure: Table Height: 185, 170, 168, 179, 182, 188, 180, 180, 183, 180, 180, 177; Weight: 72, 56, 60, 68, 72, 77, 71, 70, 84, 88, 67, 76)
    11. Dec 2022, 3 marksCompare partitioning clustering and hierarchical clustering.
    12. Dec 2022, 8 marksBy using k-means clustering algorithm divide the below data points into three groups by using the Euclidean distance. Assume the initial centroids are (1,2), (8,9) and (18,18). (Figure: Table X: 16, 2, 1, 17, 18, 9, 3, 8, 2, 19, 3, 7; Y: 17, 2, 2, 19, 18, 10, 3, 9, 3, 17, 2, 9 (last column partly covered by a library stamp, read as (7,9)))
  5. 5

    Decision Trees: ID3 Algorithm

    Must doModule 2asked in 8 of 9 papersNotes p. 17–21 (opens in a new tab)

    Short note
    • A decision tree splits data recursively on attributes. Internal nodes test an attribute, branches are outcomes, leaves give the class.
    • Entropy H(S) = -sum p_i log2 p_i. It is 0 for a pure set and 1 for a 50/50 binary split. Gini = 1 - sum p_i^2.
    • Information Gain(S, A) = H(S) - sum (|S_v| / |S|) H(S_v). ID3 picks the attribute with the highest gain.
    • ID3 steps: compute entropy of the target, compute gain of each attribute, split on the best one, repeat on each subset until pure or no attributes remain.
    • ID3 overfits and handles only categorical attributes. Prune the tree to reduce overfitting.

    For detail: Notes pages 17–21 (opens in a new tab)

    9 of 11 past questions (others unreadable)
    1. Model paper, 2 marksa) A node has 4 positive and 4 negative examples. A split gives children (3+, 1−) and (1+, 3−). Find the information gain. (2)
    2. Jun 2026, 14 marksa) Explain the concept of Information Gain in ID3 decision trees. (6) b) Identify the first splitting attribute for decision tree by using ID3 algorithm with the following dataset. (8) (Figure: Table Age, Income, Gender -> Risk: <25, >50, M, High; <25, >50, F, High; >=25, <50, F, High; >=25, >50, F, Low; >=25, >50, M, Low; <25, <50, M, High; <25, <50, M, High; <25, <50, F, High)
    3. May 2025, 14 marksa) Explain the ID3 algorithm. Also discuss about entropy and information gain. (6) b) Calculate the information gain of attributes humidity and wind in the 'Play tennis' dataset given below. (8) (Figure: Table day/outlook/temperature/humidity/wind/playtennis: D1 sunny hot high weak no; D2 sunny hot high strong no; D3 overcast hot high weak yes; D4 rain mild high weak yes; D5 rain cool normal weak yes; D6 rain cool normal strong no; D7 overcast cool normal strong yes; D8 sunny mild high weak no; D9 sunny cool normal weak yes; D10 rain mild normal weak yes; D11 sunny mild normal strong yes; D12 overcast mild high strong yes; D13 overcast hot normal weak yes; D14 rain mild high strong no)
    4. 2025, 6 marksAssume we have a classification problem involving 3 classes: professors, students, and staff members. There are 750 students, 150 staff members and 100 professors. All professors have blond hair, 50 staff members have blond hair, and 250 students have blond hair. Compute the information gain of the test "hair color = blond" that returns true or false.
    5. 2025, 8 marksIdentify the first splitting attribute for decision tree by using ID3 algorithm with the following dataset. (Figure: Table, columns A1, A2, A3, Class; rows: (True,Hot,High,No); (True,Hot,High,No); (False,Hot,High,Yes); (False,Cool,Normal,Yes); (False,Cool,Normal,Yes); (True,Cool,High,No); (True,Hot,High,No); (True,Hot,Normal,Yes); (False,Cool,Normal,Yes); (False,Cool,High,Yes))
    6. Nov 2024, 3 marksDiscuss the issues involved in decision tree learning.
    7. Nov 2024, 6 marksState ID3 algorithm, used for decision tree classification.
    8. Dec 2023, 3 marksFormulate Information gain and entropy used in decision tree classifiers.
    9. Dec 2023, 5 marksState ID3 algorithm, used for decision tree classification.
  6. 6

    Hierarchical (Agglomerative) Clustering

    Must doModule 4asked in 7 of 9 papersNotes p. 6–8 (opens in a new tab)

    Short note
    • Agglomerative clustering is bottom-up. Each object starts as its own cluster, and the two closest clusters are merged until one remains or a stopping condition holds.
    • Steps: compute the distance matrix, merge the closest pair, update distances using a linkage rule, repeat. Cut the dendrogram at a chosen level to get k clusters.
    • Single linkage uses the minimum distance between clusters (nearest neighbour). Complete linkage uses the maximum. Average linkage uses the mean of all pair distances.
    • Divisive clustering is top-down: start with one cluster and split. AGNES is agglomerative, DIANA is divisive.
    • A merge cannot be undone, and the method scales poorly. No k is needed in advance.

    For detail: Notes pages 6–8 (opens in a new tab)

    13 past questions
    1. Model paper, 3 marksb) Four points A, B, C, D have the distances AB = 2, AC = 6, AD = 10, BC = 5, BD = 9, CD = 4. Build the dendrograms by single linkage and by average linkage, giving every merge height. Compare the results. (3)
    2. Jun 2026, 3 marksWrite down the major differences between K-means clustering and hierarchical clustering.
    3. Jun 2026, 14 marksa) Describe the random forest algorithm to improve classifier accuracy. (6) b) For the given data points, construct the dendrogram using Complete Linkage method. (8) (Figure: Distance matrix over items A,B,C,D: AB=2, AC=6, AD=8, BC=5, BD=7, CD=3 (symmetric, diagonal 0); table printed on page 4)
    4. 2025, 3 marksExplain the different types of linkages in clustering.
    5. 2025, 10 marksShow the final result of hierarchical clustering with complete linkage by drawing a dendrogram. (Figure: Lower-triangular distance matrix over A-F: d(B,A)=0.12; d(C,A)=0.51, d(C,B)=0.25; d(D,A)=0.84, d(D,B)=0.16, d(D,C)=0.14; d(E,A)=0.28, d(E,B)=0.77, d(E,C)=0.70, d(E,D)=0.45; d(F,A)=0.34, d(F,B)=0.61, d(F,C)=0.93, d(F,D)=0.20, d(F,E)=0.67)
    6. 2025, 8 marksSuppose that we have the following data (one variable). Use single linkage Agglomerative clustering to identify the clusters. Data: (2, 5, 9, 15, 16, 18, 25, 33, 33, 45).
    7. 2025, 4 marksIllustrate Single linkage and Complete linkage in hierarchical clustering.
    8. 2025, 10 marksGiven the dataset {a, b, c, d, e} and the following distance matrix, construct a dendrogram by complete-linkage hierarchical clustering using the agglomerative method. (Figure: Symmetric distance matrix: d(a,b)=9, d(a,c)=3, d(a,d)=6, d(a,e)=11, d(b,c)=7, d(b,d)=5, d(b,e)=10, d(c,d)=9, d(c,e)=2, d(d,e)=8)
    9. Jun 2024, 3 marksWhat is clustering? What are the different types of clustering methods?
    10. Jun 2024, 8 marksGiven the following distance matrix, construct the dendrogram using agglomerative clustering with complete linkage. (Figure: Distance matrix A-E: A: 0,1,2,2,3; B: 1,0,2,4,3; C: 2,2,0,1,5; D: 2,4,1,0,3; E: 3,3,5,3,0)
    11. Dec 2023, 6 marksIllustrate the terms a) Single linkage b) Complete linkage c) Centroid linkage
    12. Dec 2022, 3 marksCompare partitioning clustering and hierarchical clustering.
    13. Dec 2022, 8 marksGiven the dataset {A, B, C, D, E} and the below distance matrix, construct a dendrogram by single-linkage hierarchical clustering using the agglomerative method. (Figure: Distance matrix, rows/cols A-E: A: 0,9,3,6,11; B: 9,0,7,5,10; C: 3,7,0,9,2; D: 6,5,9,0,8; E: 11,10,2,8,0)
  7. 7

    Back propagation algorithm

    Must doModule 3asked in 7 of 9 papersNot in the notes

    Short note
    • Backpropagation trains a multilayer network by sending the output error backwards and using the chain rule to find the gradient of the loss for every weight.
    • Steps: initialise weights, forward pass to get outputs, compute the error, backward pass to get deltas, update weights, repeat over epochs until the error is small.
    • Output delta (sigmoid, squared error): delta_k = (t_k - o_k) o_k (1 - o_k). Hidden delta: delta_j = o_j (1 - o_j) sum (w_jk delta_k).
    • Weight update: w_ij = w_ij + eta * delta_j * o_i, where eta is the learning rate. Bias is updated the same way with input 1.
    • It uses gradient descent. It can get stuck in local minima, and sigmoid layers can cause vanishing gradients.
    9 past questions
    1. Jun 2026, 14 marksa) Describe the architecture of a multilayer feedforward neural network. (7) b) Explain the backpropagation algorithm and how it is used to train the network. (7)
    2. May 2025, 14 marksa) Explain the principle behind neural networks. Illustrate the weight optimization procedure in a backpropagation network with an example. (14)
    3. 2025, 6 marksWhat is the basic idea of back propagation algorithm
    4. 2025, 10 marksIllustrate the various steps in the back propagation algorithm, for a small network with two inputs, two outputs and one hidden layer. (Figure: Table, columns Sample, Input1, Input2, Output1, Output2; rows: (1, 0.05, 0.10, 0.01, 0.99); (2, 0.25, 0.18, 0.23, 0.79))
    5. 2025, 8 marksDescribe the basic outline of the backpropagation algorithm.
    6. Nov 2024, 14 marksAssume that the neurons have the sigmoid activation function to perform forward and backward pass on the network. And also assume that the actual output of y is 0.5 and the learning rate is 1. Now perform the back propagation using back propagation algorithm. (Figure: Figure: network with inputs x1=0.35, x2=0.7; hidden neurons h1, h2; output o3; weights w1,1=0.2, w2,1=0.2, w1,2=0.3, w2,2=0.3 (inputs to h1/h2), w1,3=0.3 (h1 to o3), w2,3=0.9 (h2 to o3))
    7. Jun 2024, 4 marksWhat is the gradient descent method? How is it used in the backpropagation algorithm?
    8. Jun 2024, 10 marksGiven the following data, use ANN with one hidden layer, appropriate initial weights and biases to compute the optimal values of the weights. Perform one iteration of the forward and phases of the backpropagation algorithm for the samples. (Figure: Table Sample, Input 1, Input 2, Output target 1, Output target 2: 1, 1.20, 2.30, 0.53, 0.76)
    9. Dec 2022, 6 marksDraw a multilayer feed forward network. Explain how learning happens in the training phase of a neural network.
  8. 8

    Machine Learning vs Traditional Programming & Learning Paradigms

    Must doModule 1asked in 7 of 9 papersNotes p. 3–12 (opens in a new tab)Notes p. 20–35 (opens in a new tab)

    Short note
    • Traditional programming: Data + Rules gives Output. Machine learning: Data + Output gives Rules (the model).
    • ML learns patterns from examples, so it suits problems where rules are hard to write, such as images, speech and spam filtering.
    • Supervised learning uses labelled data (classification, regression). Unsupervised learning uses unlabelled data (clustering, dimensionality reduction).
    • Semi-supervised learning mixes a little labelled data with a lot of unlabelled data. Reinforcement learning learns from rewards and penalties by interacting with an environment.
    • ML workflow: collect data, prepare it, choose a model, train, evaluate, tune, deploy.

    For detail: Notes pages 3–12 (opens in a new tab), Notes pages 20–35 (opens in a new tab)

    10 past questions
    1. Jun 2026, 3 marksHow does semi-supervised learning bridge the gap between supervised and unsupervised learning?
    2. May 2025, 14 marksa) Express the concept of machine learning. Differentiate between various machine learning paradigm? (14)
    3. 2025, 3 marksDefine machine learning with suitable examples. What makes machine learning different from traditional programming.
    4. 2025, 6 marksConsider the following scenarios and determine which machine learning paradigm (Supervised, Unsupervised, or Reinforcement learning) would be most appropriate. Justify your answer for each case. Scenario 1: An e-commerce platform wants to group its products into categories based on customer browsing and purchase patterns. Scenario 2: A self-driving car needs to learn how to navigate through city traffic while obeying traffic rules. Scenario 3: A healthcare company wants to predict the likelihood of a patient developing a specific disease based on their medical history and genetic information.
    5. Nov 2024, 3 marksDiscuss any 4 examples of Machine learning Applications.
    6. Nov 2024, 7 marksDifferentiate between supervised and unsupervised learning. Explain with suitable example.
    7. Jun 2024, 9 marksExplain the paradigm of machine learning.
    8. Dec 2023, 14 marksDefine machine learning. With suitable example, describe the various machine learning paradigms.
    9. Dec 2022, 8 marksClassify the different types of machine learning.
    10. Dec 2022, 6 marksSummarize the various applications of machine learning.
  9. 9

    Naive Bayes Classifier

    Must doModule 2asked in 8 of 9 papersNotes p. 9–12 (opens in a new tab)

    Short note
    • Naive Bayes classifies using Bayes' theorem: P(C|X) = P(X|C) P(C) / P(X). Posterior = likelihood * prior / evidence.
    • Naive assumption: features are independent given the class, so P(X|C) = P(x1|C) P(x2|C) ... P(xn|C).
    • Predict the class with the largest P(C) * product of P(x_i|C). P(X) is the same for all classes, so it can be dropped.
    • Laplace smoothing adds 1 to each count so that an unseen value does not make the whole product zero.
    • It is fast and works well on text and small data. The independence assumption is rarely true but still often works. Gaussian NB handles continuous features.

    For detail: Notes pages 9–12 (opens in a new tab)

    10 of 12 past questions (others unreadable)
    1. Model paper, 3 marksConsider a spam classification ML model. P(spam) = 0.3. For two words, P(w1 | spam) = 0.5, P(w2 | spam) = 0.4, P(w1 | ham) = 0.1, P(w2 | ham) = 0.2. Find P(spam | w1, w2).
    2. Model paper, 3 marksb) A spam filter uses MAP classification with Laplace (add-one) smoothing. The spam class has 100 words in total and the word "free" appears 9 times. The legitimate class has 200 words in total and "free" appears 2 times. The vocabulary has 50 words. Priors are P(spam) = 0.4 and P(ham) = 0.6. Classify a message containing the word "free" once. Explain why smoothing is needed. (3)
    3. 2025, 7 marksSuppose you have a three class problem where class label y in {0, 1, 2} and each training example X has 3 binary attributes X1, X2, X3 in {0, 1}. How many parameters (probability distribution) do you need to know to classify an example using the Naive Bayes classifier?
    4. 2025, 7 marksConsider the training data in the following table where Play is a class attribute. In the table, the Humidity attribute has values "L" (for low) or "H" (for high), Sunny has values "Y" (for yes) or "N" (for no), Wind has values "S" (for strong) or "W" (for weak), and Play has values "Yes" or "No". (Figure: Table, columns Humidity, Sunny, Wind, Play; rows: (L,N,S,No); (H,N,W,Yes); (H,Y,S,Yes); (H,N,W,Yes); (L,Y,S,No)) What is class label for the following day (Humidity=L, Sunny=N, Wind=W), according to naive Bayesian classification?
    5. 2025, 3 marksHow can Naive Bayes classifier using Bayes' Theorem can be derived and proved using the concepts of conditional probability and the law of total probability?
    6. Jun 2024, 3 marksState Bayes theorem and illustrate it with an example.
    7. Jun 2024, 10 marksBased on the following data determine the gender of a person having height 6 ft., weight 130 lbs. and foot size 8 in. (use naive Bayes algorithm). (Figure: Table Person, Height (feet), Weight (lbs), Foot size (inches): Male,6.00,180,10; Male,6.00,180,10; Male,5.50,170,8; Male,6.00,170,10; Female,5.00,130,8; Female,5.50,150,6; Female,5.00,130,6; Female,6.00,150,8)
    8. Dec 2023, 8 marksConsider the below frequency table which shows the frequency of each of the attributes. Apply Naive Bayes algorithm to predict the fruit type of {Yellow, Sweet, Long}. (Figure: Table Fruit: Yellow, Sweet, Long, Total: Mango 350, 450, 0, 650; Banana 400, 300, 350, 400; Other fruits 50, 100, 50, 150; Total 800, 850, 400, 1200)
    9. Dec 2022, 7 marksThe below dataset contains features such as Colour, Type and Origin of cars and the class whether it is stolen, not stolen. (Figure: Table: Example No, Colour, Type, Origin, Whether Stolen: 1 Red Sports Domestic Yes; 2 Red Sports Domestic No; 3 Red Sports Domestic Yes; 4 Yellow Sports Domestic No; 5 Yellow Sports Imported Yes; 6 Yellow SUV Imported No; 7 Yellow SUV Imported Yes; 8 Yellow SUV Domestic No; 9 Red SUV Imported No; 10 Red Sports Imported Yes) Use Naive Bayes algorithm to determine whether a red domestic SUV car is stolen or not.
    10. Dec 2022, 8 marksGiven the following data on a certain set of patients seen by a doctor, can the doctor conclude that the person having chills, fever, mild headache and without running nose has a flu? (Figure: Table: Chills, Running Nose, Headache, Fever, Has Flu: (Y,N,Mild,Y,N); (Y,Y,No,N,Y); (Y,N,Strong,Y,Y); (N,Y,Mild,Y,Y); (N,N,No,N,N); (N,Y,Strong,Y,Y); (N,Y,Strong,N,N); (Y,Y,Mild,Y,Y)) Construct a decision tree using ID3 algorithm and predict the class for the above case.
  10. 10

    Non-linear SVM & Kernels

    HighModule 3asked in 8 of 9 papersNotes p. 20–37 (opens in a new tab)

    Short note
    • Non-linear SVM maps data into a higher-dimensional space where it can become linearly separable, then finds the maximum-margin hyperplane there.
    • Kernel trick: compute K(x, z) = phi(x).phi(z) directly, without building phi(x). This avoids the huge cost of explicit high-dimensional features.
    • Polynomial kernel: K(x, z) = (x.z + c)^d. RBF (Gaussian) kernel: K(x, z) = exp(-gamma * |x - z|^2). Linear kernel: K(x, z) = x.z.
    • A linear boundary in the high-dimensional space becomes a curved boundary in the original space.
    • A large gamma gives a wiggly boundary that overfits. A small gamma gives a smoother one. The soft-margin C trades margin width against errors.

    For detail: Notes pages 20–37 (opens in a new tab)

    11 past questions
    1. Model paper, 2 marksa) The 1-D data have class +1 at x = −3 and x = 3, and class −1 at x = −1, 0 and 1. Can a single threshold separate them? Give a feature map that can. (2)
    2. Model paper, 3 marksc) Show that the XOR data (1, 1) and (−1, −1) with y = +1, and (1, −1) and (−1, 1) with y = −1, are not linearly separable, and solve them with a degree-2 polynomial kernel. (3)
    3. Jun 2026, 14 marksa) Describe the process of finding the maximum margin hyperplane in SVM classification. (7) b) Explain how the kernel trick allows SVMs to handle non-linearly separable data. List any four types of Kernels used in SVM. (7)
    4. May 2025, 14 marksa) State the mathematical formulation of the SVM problem. (8) b) How do you find a hyperplane for non-linear data in SVM? (6)
    5. 2025, 3 marksShow that the function K(x, y) = (x . y)^2 is a kernel function.
    6. 2025, 8 marksWhat is a kernel in SVM? Why do we use kernels in SVM?
    7. 2025, 6 marksWhat is "Kernel trick"? Explain different types of kernel functions.
    8. Nov 2024, 3 marksDescribe the significance of kernel function in SVM. List any two kernel functions.
    9. Jun 2024, 3 marksMention the primary motivation for using the kernel trick in machine learning algorithms.
    10. Dec 2023, 6 marksDefine any 3 kernal functions used for non-linear SVM
    11. Dec 2022, 6 marksExplain kernel trick in the context of support vector machine. List any two Kernel function used in SVM.
  11. 11

    Dimensionality Reduction: Principal Component Analysis (PCA)

    HighModule 4asked in 7 of 9 papersNotes p. 12 (opens in a new tab)

    Short note
    • PCA reduces dimensions by projecting data onto new orthogonal axes (principal components) that capture the most variance.
    • Steps: standardise or mean-centre the data, compute the covariance matrix, find its eigenvalues and eigenvectors, sort by eigenvalue, keep the top k, project the data.
    • The first component has the highest variance, and each next one has the most remaining variance while staying orthogonal to the earlier ones.
    • Explained variance ratio of a component = its eigenvalue / sum of all eigenvalues. Keep enough components to reach a target such as 95%.
    • PCA is unsupervised and linear. It is lossy, and components are harder to interpret than the original features.

    For detail: Notes page 12 (opens in a new tab)

    9 past questions
    1. Model paper, 3 marksThe covariance eigenvalues are 4 and 1. Find the share of variance explained by the first principal component. Then, for eigenvalues 5, 3, 1, 0.5, 0.5, find how many components keep at least 95% of the variance.
    2. Model paper, 3 marksc) Perform PCA on the data (4, 3), (2, 2), (3, 1). Find the covariance matrix, the eigenvalues and eigenvectors, the proportion of variance explained, the one-dimensional scores and the reconstruction error when only the first component is kept. (3)
    3. Jun 2026, 14 marksa) Calculate least square regression line using matrix method for the following data points: x: (Figure: 1, 2, 3, 4, 5); y: (Figure: 2.1, 4.0, 6.3, 8.1, 9.9). (8) b) Explain the procedure to reduce the dimensionality of a dataset using Principal Component Analysis. (6)
    4. 2025, 6 marksIllustrate the idea of PCA for a two dimensional data using suitable diagrams
    5. 2025, 3 marksIs principal component analysis a supervised learning problem? Justify your answer.
    6. 2025, 6 marksExplain various dimensionality reduction techniques. Why dimensionality reduction technique is important?
    7. Nov 2024, 14 marksIllustrate the idea of PCA for a two-dimensional data using suitable diagram.
    8. Jun 2024, 3 marksWhat is Principal Component Analysis (PCA)? Which eigenvalue indicates the direction of the largest variance?
    9. Dec 2022, 6 marksExplain the procedure to reduce the dimensionality of a dataset using principal component analysis.
  12. 12

    Linear Regression (one & multiple variables): Gradient Descent

    HighModule 1asked in 7 of 9 papersNotes p. 58–68 (opens in a new tab)

    Short note
    • Simple linear regression: y = a + b x. Multiple regression: y = a0 + a1 x1 + ... + an xn. The line is fitted by minimising squared error.
    • Cost J = (1/2m) sum (h(x_i) - y_i)^2.
    • Gradient descent update: w_j = w_j - alpha * dJ/dw_j, repeated for all parameters at once. Alpha is the learning rate.
    • For y = mx + c: dJ/dm = (1/m) sum (h - y) x and dJ/dc = (1/m) sum (h - y).
    • Alpha too small means slow convergence, too large means divergence. Scale features to help gradient descent converge.

    For detail: Notes pages 58–68 (opens in a new tab)

    10 of 11 past questions (others unreadable)
    1. Model paper, 3 marksTo fit a quadratic curve to one input x, give the feature vector at x = 3. Is the model still linear regression?
    2. Model paper, 4 marksb) Derive the normal equation for linear regression. Then solve it for the data (1, 1), (2, 3), (3, 2), and compare with one vectorised gradient descent step from θ = 0 with α = 0.1 (step size). (4)
    3. Model paper, 3 marksc) A company has m = 10? examples. Compare gradient descent and the normal equation for (a) n = 100 features and (b) n = 10? features, using 1000 gradient descent iterations. Recommend a method for each case. (3) (Figure: exponents lost in print: m = 10^? and n = 10^? illegible; likely powers of ten such as 10^6 and 10^5)
    4. May 2025, 6 marksa) Explain the concept behind gradient descent method of optimization. (6)
    5. 2025, 3 marksObtain a linear regression for the data in table, assuming that y is the dependent variable. (Figure: Table: x = 1.0, 2.0, 3.0, 4.0, 5.0; y = 1.00, 2.00, 1.30, 3.75, 2.25)
    6. 2025, 7 marksConsider the hypothesis for the linear regression h_theta(x) = theta0 + theta1 x, and the cost function J(theta0, theta1) = 1/(2m) sum_{i=1 to m} (h_theta(x^(i)) - y^(i))^2 where m is the number of training examples. Given the following set of training examples. (Figure: Table: (x,y) = (3,2), (1,2), (0,1), (4,3)) Answer the following questions: 1) Find the value of h_theta(2) if theta0 = 0 and theta1 = 1.5 2) Find the value of J(0,1) 3) Suppose the value of J(theta0, theta1) = 0. What can be inferred from this?
    7. Jun 2024, 6 marksSpecify the basic principle of the gradient descent algorithm.
    8. Jun 2024, 4 marksWhat is the gradient descent method? How is it used in the backpropagation algorithm?
    9. Dec 2023, 9 marksDescribe the different regression models and formulate any one error measurements used in regression analysis.
    10. Dec 2022, 7 marksUse the following data to construct a linear regression model for an auto insurance premium as a function of driving experience. (Figure: Table: Driving experience (in years) -> Monthly auto insurance premium ($): 5->64, 2->87, 12->50, 9->71, 15->44, 6->56, 25->42, 16->60)
  13. Your 12 topics end here: about 45/60 on past papers
  14. 13

    Neural Network: Multilayer Feed-Forward Network & Activation Functions (Sigmoid, ReLU, Tanh)

    HighModule 3asked in 6 of 9 papersNotes p. 38–53 (opens in a new tab)

    Short note
    • A feed-forward MLP has an input layer, one or more hidden layers and an output layer. Each neuron computes a weighted sum plus bias, then applies an activation function.
    • Net input: z = sum(w_i x_i) + b, output y = f(z). Information flows forward only, with no loops.
    • Sigmoid: f(z) = 1 / (1 + e^-z), range 0 to 1, used for probabilities. Tanh: range -1 to 1, zero-centred. ReLU: f(z) = max(0, z).
    • Non-linear activations let hidden layers learn non-linear patterns. Without them, stacked layers collapse into one linear model.
    • ReLU is cheap and avoids vanishing gradients for positive inputs. Sigmoid and tanh saturate at the ends, so gradients become tiny.

    For detail: Notes pages 38–53 (opens in a new tab)

    13 past questions
    1. Model paper, 3 marksa) Show that XOR cannot be computed by one perceptron, then build a two-layer network of threshold neurons that computes it. (3)
    2. Model paper, 3 marksb) A digit-recognition network takes 28 × 28 = 784 pixel inputs, has hidden layers of 128 and 64 ReLU neurons, and has 10 softmax outputs. Count the parameters, estimate memory and computation, and compare with a single-layer softmax model. State the loss and the output rule. (3)
    3. Jun 2026, 3 marksExplain the different types of layers in ANN.
    4. Jun 2026, 3 marksExplain the purpose of the activation function in a neural network.
    5. Jun 2026, 14 marksa) Describe the architecture of a multilayer feedforward neural network. (7) b) Explain the backpropagation algorithm and how it is used to train the network. (7)
    6. 2025, 6 marksDescribe the working of a multilayer feed forward network
    7. Nov 2024, 3 marksWith suitable equations explain any two types of activation functions used in neural networks.
    8. Nov 2024, 4 marksBriefly explain one way in which using TanH instead of sigmoid activations makes optimization easier?
    9. Dec 2023, 8 marksDescribe the working of multilayer perceptron.
    10. Dec 2023, 6 marksDraw the perceptron for the following data and calculate the output of the perceptron if the following activations are used? (Figure: X1=1, W1=0.7; X2=0, W2=-0.3; X3=1, W3=0.4; X4=1, W4=-0.8; X5=0, W5=0.5) a) Sigmoid activation function b) TanH activation function
    11. Dec 2022, 3 marksDraw the activation function ReLu. What are the advantages of using ReLu over a sigmoid function.
    12. Dec 2022, 6 marksCompute the output of the following neuron if the activation function is, i) ReLu ii) Sigmoid iii) Tanh. (Figure: Figure: neuron Y with bias input 1 (weight 0.1) and inputs x1 = 0.6 (weight 0.3), x2 = 0.5 (weight 0.7), x3 = 0.8 (weight 0.5); output y)
    13. Dec 2022, 6 marksDraw a multilayer feed forward network. Explain how learning happens in the training phase of a neural network.
  15. 14

    Ensemble Methods: Bagging & Boosting

    HighModule 4asked in 8 of 9 papersNotes p. 21–23 (opens in a new tab)

    Short note
    • Ensemble methods combine many models to get better accuracy than one model.
    • Bagging (bootstrap aggregation): train each model on a bootstrap sample drawn with replacement, then take a majority vote (classification) or average (regression). It reduces variance.
    • Boosting trains models in sequence. Misclassified tuples get higher weights, and each model's vote is weighted by its accuracy. It mainly reduces bias. AdaBoost is the standard example.
    • AdaBoost starts with equal tuple weights 1/d. Each round raises the weights of misclassified tuples and lowers the rest.
    • Random forest is bagging of decision trees plus a random feature subset at each split. Bagging models train in parallel, boosting models train one after another.

    For detail: Notes pages 21–23 (opens in a new tab)

    12 past questions
    1. Model paper, 3 marksFive independent classifiers are each 60% accurate. Find the majority-vote accuracy, and say what changes if all five make identical predictions.
    2. Model paper, 2 marksa) Three AdaBoost learners have α = 0.9, 0.4 and 0.3, and they vote +1, −1 and −1. Find the ensemble prediction. (2)
    3. Model paper, 3 marksc) Run three rounds of AdaBoost with decision stumps on the 1-D data x = 0, 1, …, 9 with labels +, +, +, −, −, −, +, +, +, −. Use the stumps h1: + if x ≤ 2 else −; h2: + if x ≤ 8 else −; h3: − if x ≤ 5 else +. Find α, the weight updates and the final ensemble predictions. (3) (Figure: h subscripts inferred)
    4. Jun 2026, 14 marksa) Describe the random forest algorithm to improve classifier accuracy. (6) b) For the given data points, construct the dendrogram using Complete Linkage method. (8) (Figure: Distance matrix over items A,B,C,D: AB=2, AC=6, AD=8, BC=5, BD=7, CD=3 (symmetric, diagonal 0); table printed on page 4)
    5. May 2025, 3 marksExplain the concept of bagging.
    6. 2025, 3 marksExplain voting and the advantages of voting in ensemble method.
    7. 2025, 4 marksExplain any two ensemble methods used for learning.
    8. Nov 2024, 3 marksDescribe boosting. What is the relation between Boosting and Ensemble learning?
    9. Jun 2024, 3 marksWhat is a base learner? How do we select base learners?
    10. Jun 2024, 6 marksExplain Bagging and Boosting in detail.
    11. Dec 2023, 3 marksPoint out the difference between voting and bagging
    12. Dec 2022, 6 marksExplain any two ensemble methods used for learning.
  16. 15

    Supervised Learning: Feature Representation, Problem Formulation, Loss Functions & Optimization

    HighModule 1asked in 7 of 9 papersNotes p. 43–57 (opens in a new tab)

    Short note
    • Supervised learning learns a mapping from inputs x to a known output y using labelled examples. Each example is a feature vector, such as x = [area, bedrooms].
    • Problem formulation: choose a hypothesis h(x), such as h(x) = w1 x1 + w2 x2 + b, then pick parameters that minimise a loss over the training data.
    • Common losses: squared error for regression, cross-entropy for classification, hinge loss for SVM.
    • Optimisation adjusts the parameters to reduce the loss, usually by gradient descent: w = w - alpha * dJ/dw.
    • Regression predicts a continuous value. Classification predicts a discrete class.

    For detail: Notes pages 43–57 (opens in a new tab)

    11 past questions
    1. Model paper, 3 marksTo fit a quadratic curve to one input x, give the feature vector at x = 3. Is the model still linear regression?
    2. Model paper, 2 marksa) A single prediction is off by 10 units. Compare its contribution to the squared loss and to the absolute loss. (2)
    3. Jun 2026, 3 marksDefine supervised learning. Name special cases of supervised learning depending on whether the inputs/outputs are categorical, or continuous.
    4. May 2025, 3 marksMention the methodology for implementing a K-class problem.
    5. May 2025, 3 marksDifferentiate between regression and classification.
    6. 2025, 4 marksDistinguish between classification and regression with an example
    7. 2025, 3 marksWrite short notes on classification and regression with example.
    8. 2025, 6 marksExplain the methods used to learn multiple classes for a K class Classification Problem.
    9. Jun 2024, 3 marksDefine supervised learning. Name special cases of supervised learning depending on whether the inputs/outputs are categorical, or continuous.
    10. Jun 2024, 6 marksWhat is the classification problem in machine learning? Describe three real-life situations in different domains where such problems arise.
    11. Dec 2022, 3 marksDistinguish between classification and regression.
  17. 16

    Generalisation & Overfitting: LASSO and Ridge Regularisation

    HighModule 2asked in 6 of 9 papersNotes p. 22–28 (opens in a new tab)Module 1 notes p. 89–96 (opens in a new tab)

    Short note
    • Generalisation is performing well on unseen data. Overfitting means low training error but high test error. Underfitting means high error on both.
    • Overfitting causes: too complex a model, little data, noisy data, too many features, too long training. Fixes: more data, simpler model, cross-validation, early stopping, regularisation.
    • Regularisation adds a penalty to the loss: J = loss + lambda * penalty. A larger lambda means a simpler model.
    • Ridge (L2) penalty = lambda * sum w_j^2. It shrinks weights but rarely makes them exactly zero.
    • LASSO (L1) penalty = lambda * sum |w_j|. It drives some weights to exactly zero, so it also does feature selection.

    For detail: Notes pages 22–28 (opens in a new tab), Module 1 notes pages 89–96 (opens in a new tab)

    8 past questions
    1. Model paper, 3 marksA model has 2% training error and 25% validation error. Diagnose the problem and give two remedies.
    2. Model paper, 4 marksc) Show that MAP estimation with a Gaussian prior on regression weights is ridge regression. Then, for the model y = wx + ε with ε ~ N(0, 1), prior w ~ N(0, 1) and data (x, y) = (1, 2), (2, 3), compare the MLE and MAP. (4)
    3. May 2025, 6 marksb) Write in detail about model selection and generalization. (6)
    4. May 2025, 4 marksc) Write a note on the impact of noise in dataset on model creation. (4)
    5. 2025, 3 marksDescribe the over fitting problem in machine learning and Identify some reason for this problem?
    6. Nov 2024, 3 marksBriefly describe the concept on Model selection and Generalization.
    7. Jun 2024, 3 marksDifferentiate between underfitting and overfitting in detail.
    8. Dec 2023, 8 marksDefine the terms model selection and generalisation
  18. 17

    Resampling Methods: Bootstrapping & Cross Validation

    HighModule 4asked in 5 of 9 papersNotes p. 20–21 (opens in a new tab)

    Short note
    • K-fold cross-validation: split the data into k equal folds. Train on k-1 folds, test on the remaining one, repeat k times, then average the results. Every sample is tested once.
    • Leave-one-out is k-fold with k = n. Stratified k-fold keeps the class proportions in each fold. Stratified 10-fold is the usual recommendation.
    • Bootstrap samples n tuples with replacement. About 63.2% of the original tuples land in the training sample, and the other 36.8% (about e^-1) form the test set.
    • Bootstrap works well on small datasets. Cross-validation uses data efficiently and gives a low-bias estimate of accuracy.

    For detail: Notes pages 20–21 (opens in a new tab)

    8 past questions
    1. Model paper, 2 marksa) In 5-fold cross-validation on 100 examples, how many models are trained, and how large is each training set? (2)
    2. Model paper, 4 marksb) A data set has 10 examples numbered 1 to 10. One bootstrap sample draws the indices 2, 5, 5, 7, 1, 9, 2, 2, 10, 4. (a) Find the in-bag and out-of-bag examples. (b) The tree trained on this sample is tested on the OOB examples, whose true labels are 3: +, 6: −, 8: + and whose predictions are +, +, +. Find the OOB error. (c) Derive the expected fraction of distinct examples in a bootstrap sample. (4)
    3. May 2025, 3 marksExplain the concept of bootstrapping.
    4. May 2025, 14 marksa) Define various performance metrics of a machine learning model. (6) b) Calculate accuracy, recall and precision from the following data. (3) (Figure: Confusion matrix, rows Predict, columns Actual: Predict Yes: Actual Yes 50, Actual No 30; Predict No: Actual Yes 20, Actual No 180) c) What is cross validation and mention the benefits of using cross validation in a machine learning model? (5)
    5. 2025, 8 marksExplain cross-validation in machine learning. Explain the different types of cross-validations.
    6. Jun 2024, 4 marksWhat is meant by leave-one-out cross-validation?
    7. Dec 2022, 3 marksWhat is meant by k-fold cross validation. Given a dataset with 1600 instances, how the k-fold validation is done with k = 10.
    8. Dec 2022, 3 marksDistinguish between bootstrapping and cross validation.
  19. 18

    Logistic Regression

    HighModule 2asked in 5 of 9 papersNotes p. 3–8 (opens in a new tab)

    Short note
    • Logistic regression is a classifier. It passes the linear score z = w.x + b through the sigmoid to get a probability.
    • Sigmoid: h(x) = 1 / (1 + e^-z). Output is between 0 and 1. Predict class 1 if h(x) >= 0.5, which means z >= 0.
    • Log-odds (logit): ln(p / (1 - p)) = w.x + b. Odds = p / (1 - p).
    • Loss is cross-entropy: J = -(1/m) sum [y log h + (1 - y) log(1 - h)]. Gradient descent update: w = w - alpha * (1/m) sum (h - y) x.
    • Types: binomial (two classes), multinomial (3+ unordered), ordinal (3+ ordered). The decision boundary is linear.

    For detail: Notes pages 3–8 (opens in a new tab)

    5 past questions
    1. Model paper, 3 marksb) A bank labels loan applicants as default (1) or not (0). Four applicants have debt-ratio x and label: (1, 1), (2, 0), (3, 1), (4, 1). Starting from θ0 = θ1 = 0 with α = 1, do one batch gradient descent step for logistic regression and compare the costs. (3) (Figure: θ subscripts inferred)
    2. Jun 2026, 3 marksList the key assumptions of logistic regression.
    3. 2025, 6 marksDiscuss logistic Regression. Write the pros and cons of logistic regression
    4. Dec 2023, 3 marksIs Logistic regression a classification model? Justify your answer.
    5. Dec 2022, 3 marksWrite a short note on logistic regression.
  20. 19

    Perceptron

    Quick reviseModule 3asked in 4 of 9 papersNotes p. 54–59 (opens in a new tab)

    Short note
    • A perceptron is a single neuron for binary classification. It computes z = sum(w_i x_i) + b and applies a step function: output 1 if z >= 0, else 0.
    • Weights set how much each input matters. Bias shifts the decision boundary away from the origin.
    • Learning rule: w_i = w_i + eta * (t - y) * x_i, and b = b + eta * (t - y). Weights change only on mistakes.
    • A single-layer perceptron learns only linearly separable problems (AND, OR) and cannot learn XOR. A multilayer perceptron can.
    • The perceptron convergence theorem says the rule converges if the data is linearly separable.

    For detail: Notes pages 54–59 (opens in a new tab)

    5 past questions
    1. Model paper, 3 marksChoose weights and a bias for a perceptron that implements the AND gate, and verify one case that gives 1 and one that gives 0.
    2. Model paper, 3 marksa) Show that XOR cannot be computed by one perceptron, then build a two-layer network of threshold neurons that computes it. (3)
    3. 2025, 4 marksConsider a neuron with four inputs, and weight of edge connecting the inputs are 1, 2, 3 and 4. Let the bias of the node is zero and inputs are 2, 3, 1, and 4. If the activation function is linear f(x) = 2x, compute the output of the neuron.
    4. 2025, 3 marksA neuron with 4 inputs has the weights 0.3, 0.8, 0.2, 0.5 and bias 1. The activation function is linear, f(x) = 2x. If the inputs are 4, 3, 5, 2, compute the output. Draw a diagram representing the neuron.
    5. Dec 2023, 6 marksDraw the perceptron for the following data and calculate the output of the perceptron if the following activations are used? (Figure: X1=1, W1=0.7; X2=0, W2=-0.3; X3=1, W3=0.4; X4=1, W4=-0.8; X5=0, W5=0.5) a) Sigmoid activation function b) TanH activation function
  21. 20

    Linear Regression: Matrix Method (Normal Equation)

    Quick reviseModule 1asked in 2 of 9 papersNotes p. 66–73 (opens in a new tab)

    Short note
    • The normal equation solves linear regression in one step with no learning rate and no iterations.
    • Write the model as y = X w, where X has a column of ones for the intercept. Then w = (X^T X)^-1 X^T y.
    • Steps: build X and y, compute X^T X, invert it, multiply by X^T y.
    • It needs X^T X to be invertible, and inversion costs about O(n^3) in the number of features, so it is slow for very many features. Gradient descent scales better.
    • Normal equation: no feature scaling needed, no alpha, one step. Gradient descent: iterative, needs alpha, works for large feature counts.

    For detail: Notes pages 66–73 (opens in a new tab)

    3 past questions
    1. Model paper, 4 marksb) Derive the normal equation for linear regression. Then solve it for the data (1, 1), (2, 3), (3, 2), and compare with one vectorised gradient descent step from θ = 0 with α = 0.1 (step size). (4)
    2. Model paper, 3 marksc) A company has m = 10? examples. Compare gradient descent and the normal equation for (a) n = 100 features and (b) n = 10? features, using 1000 gradient descent iterations. Recommend a method for each case. (3) (Figure: exponents lost in print: m = 10^? and n = 10^? illegible; likely powers of ten such as 10^6 and 10^5)
    3. Jun 2026, 14 marksa) Calculate least square regression line using matrix method for the following data points: x: (Figure: 1, 2, 3, 4, 5); y: (Figure: 2.1, 4.0, 6.3, 8.1, 9.9). (8) b) Explain the procedure to reduce the dimensionality of a dataset using Principal Component Analysis. (6)
  22. 21

    Clustering: Similarity Measures

    Quick reviseModule 4asked in 8 of 9 papersNotes p. 3–5 (opens in a new tab)

    Short note
    • Clustering compares objects with distance (dissimilarity) or similarity measures. A distance metric has d(i,j) >= 0, d(i,i) = 0, d(i,j) = d(j,i) and the triangle inequality.
    • Euclidean: d = sqrt(sum (x_i - y_i)^2). Manhattan: d = sum |x_i - y_i|. Example for (1,2) and (3,5): Euclidean 3.61, Manhattan 5.
    • Minkowski: d = (sum |x_i - y_i|^p)^(1/p). p = 1 gives Manhattan and p = 2 gives Euclidean.
    • Cosine similarity = (v1 . v2) / (|v1| |v2|). It compares the angle between vectors, not their size, so it suits text and documents.

    For detail: Notes pages 3–5 (opens in a new tab)

    8 past questions
    1. Model paper, 3 marksa) Three users rate four movies: u1 = (5, 3, 0, 1), u2 = (4, 0, 0, 1) and u3 = (1, 1, 5, 4), where 0 means "not rated". (a) Compute the Euclidean, Manhattan and cosine measures between u1 and each of u2 and u3. (b) Compute the Jaccard similarity of the sets of rated movies. (c) Show what happens to each measure when u1 is doubled. (3) (Figure: subscripts inferred)
    2. Jun 2026, 3 marksCalculate the dissimilarity between two data points x1(3,2,4) and x2(5,3,5) using (a) Euclidean distance (b) Manhattan distance.
    3. May 2025, 3 marksWrite any 3 distance measures between data points.
    4. 2025, 4 marksGiven two objects represented by the tuples (22, 1, 42, 10) and (20, 0, 36, 8): (i) Compute the Euclidean distance between the two objects. (ii) Compute the Manhattan distance between the two objects.
    5. 2025, 3 marksExplain any three different ways to measure the similarity while using k-means clustering algorithm.
    6. Nov 2024, 4 marksWrite a note on similarity measures used in unsupervised learning.
    7. Dec 2023, 6 marksState any 3 similarity measures used in clustering algorithms
    8. Dec 2022, 3 marksExplain any three different ways to measure the distance similarity while using k-means clustering algorithm.
  23. 22

    Regression Evaluation: MAE, RMSE & R-squared

    Quick reviseModule 2asked in 2 of 9 papersModule 1 notes p. 83–93 (opens in a new tab)

    Short note
    • MAE = (1/n) sum |y - y_hat|. It is in the target's units and less sensitive to outliers.
    • MSE = (1/n) sum (y - y_hat)^2. RMSE = sqrt(MSE). Both punish large errors more, and RMSE is back in the target's units.
    • R^2 = 1 - RSS / TSS, where RSS = sum (y - y_hat)^2 and TSS = sum (y - y_mean)^2. It is the fraction of variance explained.
    • R^2 = 1 is a perfect fit, 0 is no better than predicting the mean, and below 0 is worse than the mean. Lower MAE, MSE and RMSE mean a better model.

    For detail: Module 1 notes pages 83–93 (opens in a new tab)

    2 past questions
    1. Dec 2023, 9 marksDescribe the different regression models and formulate any one error measurements used in regression analysis.
    2. Dec 2022, 3 marks(Figure: Table of Actual vs Predicted: (4,5), (3,4), (15,19), (7,10), (9,12), (20,21)) Use the above dataset to calculate, mean square error, mean absolute error and root mean square error.
  24. 23

    Bias-Variance Tradeoff

    Quick reviseModule 4asked in 4 of 9 papersNot in the notes

    Short note
    • Expected test error = Bias^2 + Variance + Irreducible error (noise).
    • Bias is error from overly simple assumptions, which causes underfitting. Variance is sensitivity to the training sample, which causes overfitting.
    • Simple models have high bias and low variance. Complex models have low bias and high variance.
    • Increasing complexity lowers bias but raises variance. Test error is lowest at the best balance.
    • Reduce variance with more data, regularisation, bagging or a simpler model. Reduce bias with a more flexible model or better features.
    5 past questions
    1. May 2025, 3 marksWhat is bias variance trade off?
    2. 2025, 3 marksJustify how bias and variance trade-off affect the machine learning algorithms?
    3. 2025, 6 marksAssume you have a model with a high bias and a low variance. Interpret the characteristics of such a model?
    4. Jun 2024, 4 marksDefine Bias-Variance decomposition.
    5. Dec 2023, 5 marksDescribe the Bias-variance decomposition.
  25. 24

    Training, Testing & Validation Sets

    Quick reviseModule 2asked in 2 of 9 papersNotes p. 29–31 (opens in a new tab)

    Short note
    • Training set fits the model parameters. Validation set tunes hyperparameters and selects the model. Test set gives the final unbiased performance estimate.
    • The test set must be used only once at the end. Tuning on it leaks information and gives an optimistic estimate.
    • Common splits are 70/30 or 80/20 (train/test), or 60/20/20 with a validation set. Use random or stratified splitting.
    • High training accuracy with low validation accuracy signals overfitting. Low accuracy on both signals underfitting.

    For detail: Notes pages 29–31 (opens in a new tab)

    2 past questions
    1. 2025, 3 marksDiscuss the significance of validation data during training phase.
    2. Dec 2023, 3 marksWhat is the need of validation data while training a model?
  26. 25

    K-Nearest Neighbours (KNN)

    Quick reviseModule 2asked in 0 of 9 papersNotes p. 13–16 (opens in a new tab)

    Short note
    • KNN is a supervised, non-parametric, instance-based (lazy) method. It stores the training data and does the work at prediction time.
    • Steps: choose k, compute the distance from the new point to every training point, take the k nearest, then vote (classification) or average (regression).
    • Euclidean d = sqrt(sum (x_i - y_i)^2). Manhattan d = sum |x_i - y_i|.
    • Small k gives a noisy boundary and overfits. Large k over-smooths and underfits. Choose k by validation, and an odd k avoids ties in two-class problems.
    • Scale the features first, because large-range features dominate the distance. Prediction is slow on big data.

    For detail: Notes pages 13–16 (opens in a new tab)

  27. 26

    Multidimensional Scaling (MDS)

    Quick reviseModule 4asked in 0 of 9 papersNot in the notes

    Short note
    • MDS maps objects to a low-dimensional space (usually 2D or 3D) so that the distances between points match the original pairwise dissimilarities as closely as possible.
    • Input is a distance (dissimilarity) matrix, not raw features. Output is coordinates for each object, used mainly for visualisation.
    • Classical MDS: square the distances, double-centre the matrix, take the top eigenvectors and scale them by the square roots of their eigenvalues. With Euclidean distances it matches PCA.
    • Metric MDS minimises stress = sqrt(sum (d_ij - d'_ij)^2 / sum d_ij^2), where d' is the distance in the low-dimensional map. Non-metric MDS preserves only the rank order.
    • Lower stress means a better fit. Unlike PCA, MDS can start from distances alone.

What to do tonight

Pick one Part B question in each module and get solid on it: that covers 36 marks. Then learn the Part A definitions and comparisons, which are short and worth 3 marks each. Use the notes pages next to each question.

  • Module 1: Ranking adds little in this module: study the whole module.
  • Module 3: Ranking adds little in this module: study the whole module.

Predicted paper (Set 1)

KTUPredict practice paper, Set 1: built from the most repeated past questions. Not an official KTU paper. Laid out like the real exam: Part A is 8 questions of 3 marks (answer all); Part B has two 9-mark questions per module (answer one from each module).

Part A answer all questions

  1. 1

    Differentiate between regression and classification.

    3 marksAsked Dec 2022, 2025, May 2025Topic 15

  2. 2

    A coin gives 7 heads in 10 tosses, and the prior is Beta(2, 2). Find the MAP estimate.

    3 marksAsked Model paperTopic 3

  3. 3

    b) A bank labels loan applicants as default (1) or not (0). Four applicants have debt-ratio x and label: (1, 1), (2, 0), (3, 1), (4, 1). Starting from θ0 = θ1 = 0 with α = 1, do one batch gradient descent step for logistic regression and compare the costs. (3) (Figure: θ subscripts inferred)

    3 marksAsked Model paperTopic 18

  4. 4

    c) Show that MAP estimation with a Gaussian prior on regression weights is ridge regression. Then, for the model y = wx + ε with ε ~ N(0, 1), prior w ~ N(0, 1) and data (x, y) = (1, 2), (2, 3), compare the MLE and MAP. (4)

    3 marksAsked Model paperTopic 16

  5. 5

    Differentiate between Hard margin and soft margin SVM.

    3 marksAsked Dec 2023, 2025, Jun 2026Topic 1

  6. 6

    a) Show that XOR cannot be computed by one perceptron, then build a two-layer network of threshold neurons that computes it. (3)

    3 marksAsked Model paperTopic 19

  7. 7

    Five independent classifiers are each 60% accurate. Find the majority-vote accuracy, and say what changes if all five make identical predictions.

    3 marksAsked Model paperTopic 14

  8. 8

    a) Three users rate four movies: u1 = (5, 3, 0, 1), u2 = (4, 0, 0, 1) and u3 = (1, 1, 5, 4), where 0 means "not rated". (a) Compute the Euclidean, Manhattan and cosine measures between u1 and each of u2 and u3. (b) Compute the Jaccard similarity of the sets of rated movies. (c) Show what happens to each measure when u1 is doubled. (3) (Figure: subscripts inferred)

    3 marksAsked Model paperTopic 21

Part B answer one full question from each module

Module 1: answer one of these 2 questions

  1. 9a

    Discuss any 4 examples of Machine learning Applications.

    5 marksAsked Dec 2022, Nov 2024Topic 8

  2. 9b

    To fit a quadratic curve to one input x, give the feature vector at x = 3. Is the model still linear regression?

    4 marksAsked Model paperTopic 12

or

  1. 10

    b) Derive the normal equation for linear regression. Then solve it for the data (1, 1), (2, 3), (3, 2), and compare with one vectorised gradient descent step from θ = 0 with α = 0.1 (step size). (4)

    9 marksAsked Model paperTopic 20

Module 2: answer one of these 2 questions

  1. 11a

    c) A fraud-detection logistic regression is tested on 10,000 transactions, of which 100 are fraud. (a) A trivial model predicts "not fraud" always. (b) The trained model catches 70 frauds but also flags 140 genuine transactions. Compare the two using accuracy, precision, recall and F1, and explain what happens when the threshold is lowered. (4)

    5 marksAsked Model paperTopic 2

  2. 11b

    a) A node has 4 positive and 4 negative examples. A split gives children (3+, 1−) and (1+, 3−). Find the information gain. (2)

    4 marksAsked Model paperTopic 5

or

  1. 12a

    Consider a spam classification ML model. P(spam) = 0.3. For two words, P(w1 | spam) = 0.5, P(w2 | spam) = 0.4, P(w1 | ham) = 0.1, P(w2 | ham) = 0.2. Find P(spam | w1, w2).

    5 marksAsked Model paperTopic 9

  2. 12b

    Describe the different regression models and formulate any one error measurements used in regression analysis.

    4 marksAsked Dec 2023Topic 22

Module 3: answer one of these 2 questions

  1. 13a

    Describe the working of a multilayer feed forward network

    5 marksAsked Dec 2022, 2025Topic 7

  2. 13b

    What is "Kernel trick"? Explain different types of kernel functions.

    4 marksAsked Dec 2022, Nov 2024, 2025Topic 10

or

  1. 14

    b) A digit-recognition network takes 28 × 28 = 784 pixel inputs, has hidden layers of 128 and 64 ReLU neurons, and has 10 softmax outputs. Count the parameters, estimate memory and computation, and compare with a single-layer softmax model. State the loss and the output rule. (3)

    9 marksAsked Model paperTopic 13

Module 4: answer one of these 2 questions

  1. 15a

    Explain the different types of linkages in clustering.

    5 marksAsked Jun 2024, 2025Topic 4

  2. 15b

    b) Four points A, B, C, D have the distances AB = 2, AC = 6, AD = 10, BC = 5, BD = 9, CD = 4. Build the dendrograms by single linkage and by average linkage, giving every merge height. Compare the results. (3)

    4 marksAsked Model paperTopic 6

or

  1. 16a

    The covariance eigenvalues are 4 and 1. Find the share of variance explained by the first principal component. Then, for eigenvalues 5, 3, 1, 0.5, 0.5, find how many components keep at least 95% of the variance.

    5 marksAsked Model paperTopic 11

  2. 16b

    a) In 5-fold cross-validation on 100 examples, how many models are trained, and how large is each training set? (2)

    4 marksAsked Model paperTopic 17

Backup paper (Set 2)

KTUPredict practice paper, Set 2: built from the next most repeated past questions. Not an official KTU paper. If a predicted question does not come, these are other often-asked questions.

Part A answer all questions

  1. 1

    Define machine learning with suitable examples. What makes machine learning different from traditional programming.

    3 marksAsked Dec 2023, 2025Topic 8

  2. 2

    Define supervised learning. Name special cases of supervised learning depending on whether the inputs/outputs are categorical, or continuous.

    3 marksAsked Jun 2024, Jun 2026Topic 15

  3. 3

    What is the need of validation data while training a model?

    3 marksAsked Dec 2023Topic 24

  4. 4

    A model has 2% training error and 25% validation error. Diagnose the problem and give two remedies.

    3 marksAsked Model paperTopic 16

  5. 5

    For a hyperplane wᵀx + b = 0 with w = (3, 4), find the width of the margin and the distance of the point (2, 2) from the hyperplane when b = −5.

    3 marksAsked Model paperTopic 1

  6. 6

    Choose weights and a bias for a perceptron that implements the AND gate, and verify one case that gives 1 and one that gives 0.

    3 marksAsked Model paperTopic 19

  7. 7

    Illustrate the strength and weakness of k-means algorithm.

    3 marksAsked Nov 2024, 2025Topic 4

  8. 8

    Describe boosting. What is the relation between Boosting and Ensemble learning?

    3 marksAsked Jun 2024, Nov 2024Topic 14

Part B answer one full question from each module

Module 1: answer one of these 2 questions

  1. 9

    a) Observations x1, …, xn come from Uniform(0, θ), and the largest value is 7. Find the MLE of θ, and say whether it is biased. (2) (Figure: subscripts/θ not legible in print, inferred)

    9 marksAsked Model paperTopic 3

or

  1. 10

    c) A company has m = 10? examples. Compare gradient descent and the normal equation for (a) n = 100 features and (b) n = 10? features, using 1000 gradient descent iterations. Recommend a method for each case. (3) (Figure: exponents lost in print: m = 10^? and n = 10^? illegible; likely powers of ten such as 10^6 and 10^5)

    9 marksAsked Model paperTopic 12

Module 2: answer one of these 2 questions

  1. 11

    c) A screening model on 10,100 samples has TPR = 0.8 and FPR = 0.05. Compare the precision when the data set has (a) 100 positives and 10,000 negatives, and (b) 5,050 of each class. Explain why ROC curves can look good while precision is poor. (4)

    9 marksAsked Model paperTopic 2

or

  1. 12

    b) A spam filter uses MAP classification with Laplace (add-one) smoothing. The spam class has 100 words in total and the word "free" appears 9 times. The legitimate class has 200 words in total and "free" appears 2 times. The vocabulary has 50 words. Priors are P(spam) = 0.4 and P(ham) = 0.6. Classify a message containing the word "free" once. Explain why smoothing is needed. (3)

    9 marksAsked Model paperTopic 9

Module 3: answer one of these 2 questions

  1. 13

    a) The 1-D data have class +1 at x = −3 and x = 3, and class −1 at x = −1, 0 and 1. Can a single threshold separate them? Give a feature map that can. (2)

    9 marksAsked Model paperTopic 10

or

  1. 14

    What is the gradient descent method? How is it used in the backpropagation algorithm?

    9 marksAsked Jun 2024Topic 7

Module 4: answer one of these 2 questions

  1. 15

    Define Bias-Variance decomposition.

    9 marksAsked Dec 2023, Jun 2024Topic 23

or

  1. 16

    Given the following distance matrix, construct the dendrogram using agglomerative clustering with complete linkage. (Figure: Distance matrix A-E: A: 0,1,2,2,3; B: 1,0,2,4,3; C: 2,2,0,1,5; D: 2,4,1,0,3; E: 3,3,5,3,0)

    9 marksAsked Dec 2022, Jun 2024Topic 6

How sure are we?

The headline score is the average of predicting each past paper from the papers before it, at the smallest share of the syllabus (up to 60%) where that average reaches 75% of the marks. To pass our quality check, the ranking must beat random picks by at least 10 points on average at 30%, 40%, 50% and 60% of the syllabus.

This course did not meet that bar; see the notice at the top.

The newest paper (Model paper) was kept apart and not used to rank topics. The ranking must be at least as good as random picks on it, on average at those same shares.

Papers used (9): Dec 2022 AMT305, Dec 2023 AMT305, Jun 2024 AMT305, Nov 2024 AMT305, 2025 AMT305, 2025 CST413, May 2025 AMT305, Jun 2026 AMT305, Model paper.

Share of marks caught by studying the top topics (past-paper test)
Syllabus studiedForecast, averageForecast, worstRandom picks
20%33%23%29%
30%45%35%42%
40%64%45%52%
50%75%62%63%
60%78%65%72%
70%86%77%81%
80%90%80%89%

Built from 9 papers and 252 questions.

Generated 2026-11-29. Forecasts are predictions: use them to decide what to read first, not what to skip.