Practice tests · GATE

GATE DA machine learning: 5 practice questions

By the PrepMatic team · Updated · 4 min read

On this page
  1. What GATE tests in machine learning
  2. Practice questions
  3. Answers and explanations
  4. How to prepare machine learning
  5. Take the full topic test on PrepMatic

Machine learning is one of the seven sections of the GATE Data Science and AI (DA) paper, which has no separate engineering-mathematics block and gives 85 marks to subject questions. The questions are not about writing code. They test whether you understand the models well enough to compute a prediction by hand, state what a hyperparameter does, or choose between methods. The five original questions below cover those habits.

What GATE tests in machine learning

The GATE 2027 DA syllabus lists these machine-learning topics:

  • Regression: simple and multiple linear regression, ridge regression, logistic regression.
  • Classification: k-nearest neighbours, naive Bayes, linear discriminant analysis, support vector machines, decision trees.
  • Model selection: the bias-variance trade-off, leave-one-out and k-fold cross-validation.
  • Neural networks: the multi-layer perceptron and feed-forward networks.
  • Unsupervised learning: k-means and k-medoid clustering, hierarchical clustering, principal component analysis.

AI is a separate section of the paper. See the GATE Data Science and AI guide for all seven sections, and confirm details on the official syllabus page. The real paper has MCQ, MSQ and NAT questions; below, all five are MCQ.

Practice questions

Question 1

In ridge regression, the regularisation parameter λ is increased from a small value to a large one. Compared with ordinary least squares, the fitted model's:

  • A. bias decreases and variance increases
  • B. bias increases and variance decreases
  • C. bias and variance both decrease
  • D. bias and variance both increase

Question 2

A straight line y = a + bx is fitted by least squares to the three points (1, 2), (2, 3) and (3, 5). The predicted value of y at x = 4 is closest to:

  • A. 5.00
  • B. 5.50
  • C. 6.00
  • D. 6.33

Question 3

In a spam filter, 40% of mails are spam. The word "offer" appears in 50% of spam mails and 10% of non-spam mails. The word "win" appears in 30% of spam mails and 5% of non-spam mails. Assume the two words are conditionally independent given the class (naive Bayes). The probability that a mail containing both words is spam is closest to:

  • A. 0.77
  • B. 0.86
  • C. 0.95
  • D. 0.99

Question 4

Leave-one-out cross-validation is used on a dataset of 60 examples. The number of models trained, and the number of examples each model is trained on, are:

  • A. 60 models, 59 examples each
  • B. 1 model, 60 examples
  • C. 59 models, 60 examples each
  • D. 60 models, 60 examples each

Question 5

A decision-tree node holds 8 examples: 4 positive and 4 negative. A candidate split sends (3 positive, 1 negative) to the left child and (1 positive, 3 negative) to the right child. The reduction in Gini impurity from this split is:

  • A. 0.0625
  • B. 0.25
  • C. 0.375
  • D. 0.125

Answers and explanations

  1. B. A larger λ penalises large coefficients and shrinks the model towards simplicity. That introduces more bias because the fit is pulled away from the least-squares solution, but it lowers variance because the model is less sensitive to the training sample.
  2. D. With n = 3, Σx = 6, Σy = 10, Σxy = 2 + 6 + 15 = 23 and Σx² = 14: b = (3 × 23 − 6 × 10) / (3 × 14 − 36) = 9 / 6 = 1.5 and a = (10 − 1.5 × 6) / 3 = 1/3. At x = 4, y = 1/3 + 6 = 6.33.
  3. C. Spam joint weight = 0.4 × 0.5 × 0.3 = 0.06. Non-spam joint weight = 0.6 × 0.1 × 0.05 = 0.003. The posterior is 0.06 / (0.06 + 0.003) = 0.06 / 0.063 = 20/21 ≈ 0.952.
  4. A. Each of the 60 examples is held out once, so 60 models are trained, each on the remaining 59 examples. LOO has no randomness, but it is expensive for large datasets, which is why k-fold CV (k = 5 or 10) is used more often.
  5. D. The parent's Gini impurity is 1 − (0.5² + 0.5²) = 0.5. Each child has proportions 3/4 and 1/4, so its Gini impurity is 1 − (0.5625 + 0.0625) = 0.375. The two children are equal in size, so the weighted impurity is 0.375. The reduction is 0.5 − 0.375 = 0.125.

How to prepare machine learning

  • Learn each model's prediction rule well enough to run it on three or four data points by hand: the line from least squares, the nearest neighbours' vote, the naive Bayes product, the split of a decision tree.
  • Know the effect of every hyperparameter in one sentence: k in k-NN, λ in ridge, the margin parameter in SVM, tree depth, number of clusters. Bias-variance questions are mostly "which way does this move".
  • Connect the models to the maths. Least squares is linear algebra (the normal equations), naive Bayes is Bayes' theorem, PCA is eigenvectors of the covariance matrix. Strong linear algebra and probability make the ML section easier.
  • Practise evaluation arithmetic: accuracy, precision, recall, F1 from a confusion matrix, and what changes when you change a decision threshold.
  • Do one worked example of each clustering method, especially k-means iterations and single-link versus complete-link merges.
  • Set up neural-network calculations on paper: forward pass through a small MLP with a given activation, and the count of parameters in a layer.

The data structures and algorithms pages help with the Python-based programming section of the DA paper.

Take the full topic test on PrepMatic

PrepMatic's topic tests run about 15 questions in 30 minutes, which is a useful way to practise by-hand ML calculations under time pressure. The free assessment shows your weakest subjects first.

Turn the GATE syllabus into a plan you can finish

Take a free GATE assessment on PrepMatic. It shows where you stand in your branch, turns the syllabus into a plan around the hours you actually have, and builds mock tests focused on your weak subjects.

Start free assessment →Free forever plan · No credit card · 2-minute setup

Related

More in GATE

← All practice tests