MauryaHub PYQ Practice

Machine Learning Techniques · Quiz 1 · May 2026

Machine Learning Techniques · Quiz 1 · May 2026

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

10 / 11 published solutions

Question 2 MCQ · 4.0 marks

Consider a mean-centred dataset
Source diagram or notation
consisting of **5000** points in
Source diagram or notation
with features
Source diagram or notation
.Every data point satisfies
Source diagram or notation
The independent base feature
Source diagram or notation
has variance
Source diagram or notation
. The remaining features
Source diagram or notation
are mutually uncorrelated, uncorrelated with
Source diagram or notation
, and each has variance
Source diagram or notation
.Standard PCA is performed on this dataset. Let
Source diagram or notation
denote the eigenvalues of the covariance matrix in descending order. Which of the following statements is strictly true?
6406537022838.
Exactly **3** eigenvalues are zero:
Source diagram or notation
, and
Source diagram or notation
6406537022839.
Exactly **4** eigenvalues are zero(
Source diagram or notation
), and
Source diagram or notation
6406537022840.
Exactly **4** eigenvalues are zero(
Source diagram or notation
), and
Source diagram or notation
6406537022841.
Exactly **2** eigenvalues are zero(
Source diagram or notation
), and
Source diagram or notation
lies somewhere in the
Source diagram or notation
-
Source diagram or notation
-
Source diagram or notation
subspace.

Published solution

Because \(x_1=x_2=x_3\), their covariance block is \[ 100\begin{bmatrix}1&1&1\\1&1&1\\1&1&1\end{bmatrix}. \] It has eigenvalues \(300,0,0\), with leading unit eigenvector \((1,1,1)^T/\sqrt3\). Features \(x_4,\ldots,x_8\) contribute five eigenvalues \(10\); the two constant-zero features contribute two more zeros. Thus the spectrum is \[ 300,\underbrace{10,\ldots,10}_{5},\underbrace{0,\ldots,0}_{4}. \] Exactly four eigenvalues vanish, and the first principal direction is \(\pm(1,1,1,0,\ldots,0)^T/\sqrt3\). A: There are four zero eigenvalues, not three, and e₁ alone is not the principal direction. B: Correct: four zero eigenvalues and the normalized shared-feature direction, up to an arbitrary overall sign. C: The zero count is correct but the principal direction is not e₁. D: Misses the two zero modes arising from the identical first three features.

Report a correction for Q2

Question 3 MCQ · 4.0 marks

Let
Source diagram or notation
.Define
Source diagram or notation
Which of the following is the correct expression for
Source diagram or notation
?
6406537022842.Source diagram or notation
6406537022843.Source diagram or notation
6406537022844.Source diagram or notation
6406537022845.Source diagram or notation

Published solution

Let \(F(v)=\sum_i\|3x_i-2v\|^2\). Differentiating gives \[ \nabla F(v)=-4\sum_i(3x_i-2v) =-12\sum_i x_i+8nv. \] Set the gradient to zero: \[ \boxed{v^*=\frac{3}{2n}\sum_i x_i}. \] The Hessian is \(8nI\), which is positive definite for \(n>0\), so this minimizer is unique. A: Omits the factor 3/2 arising from 3xᵢ−2v. B: Correct: the minimizer is 3/2 times the sample mean. C: Twice the correct minimizer. D: Uses the reciprocal scaling rather than 3/2.

Report a correction for Q3

Question 4 MCQ · 4.0 marks

Consider the one-dimensional dataset
Source diagram or notation
Suppose
Source diagram or notation
-means is run with
Source diagram or notation
clusters. At iteration
Source diagram or notation
, the centroids are
Source diagram or notation
The assignment step is performed using these centroids to produce new assignments
Source diagram or notation
for each point. Compute
Source diagram or notation
6406537022846.
4
6406537022847.
8
6406537022848.
24
6406537022849.
44

Published solution

Use the **given** centroids \(0\) and \(10\); the expression is evaluated after assignment and before updating the centroids.
PointAssigned centroidSquared distance
\(0\)\(0\)\(0\)
\(2\)\(0\)\(4\)
\(6\)\(10\)\(16\)
\(8\)\(10\)\(4\)
Therefore the objective is \(0+4+16+4=\boxed{24}\). A: Would be the objective after updating centroids to 1 and 7, which the expression does not request. B: Does not equal the sum using the given centroids. C: Correct: the fixed-centroid assignment cost is 24. D: Does not equal the nearest-centroid squared-distance sum.

Report a correction for Q4

Question 5 MCQ · 3.0 marks

Which of the following statements is
Source diagram or notation
true for the
Source diagram or notation
-means algorithm with
Source diagram or notation
cluster centres, between consecutive iterations
Source diagram or notation
and
Source diagram or notation
?
6406537022850.
If
Source diagram or notation
,then at least one data point will change its cluster assignment from iteration
Source diagram or notation
to
Source diagram or notation
.
6406537022851.
If
Source diagram or notation
, then no data point will change its cluster assignment from iteration
Source diagram or notation
to
Source diagram or notation
.
6406537022852.
If a data point changes its cluster assignment from cluster
Source diagram or notation
to cluster
Source diagram or notation
, it is guaranteed that the centroid of cluster
Source diagram or notation
strictly changes, i.e.,
Source diagram or notation
.
6406537022853.
It is not possible for the
Source diagram or notation
-means algorithm to revisit a configuration, where a configuration corresponds to the
Source diagram or notation
-way partition generated by clustering at the end of each iteration.

A published solution is not available for this question yet.

Report a correction for Q5

Question 6 MCQ · 3.0 marks

A dataset containing 1,000 points is clustered using the
Source diagram or notation
-means algorithm. Which of the following values of
Source diagram or notation
is most likely to yield the
Source diagram or notation
value of objective function of
Source diagram or notation
-means?
6406537022854.Source diagram or notation
6406537022855.Source diagram or notation
6406537022856.Source diagram or notation
6406537022857.Source diagram or notation

Published solution

The objective is a sum of nonnegative squared distances. With \(k=1000\) and \(1000\) data points, one can place one centroid at every point, giving \[ J=\sum_{i=1}^{1000}\|x_i-x_i\|^2=\boxed0. \] No smaller value is possible. Among the listed choices, **\(k=1000\)** therefore permits the minimum objective. A: A single centroid must usually represent many distinct points, producing positive error. B: More flexible than k=1 but does not in general fit every point exactly. C: More flexible than k=10, but still need not give zero error. D: Correct: one centroid per point gives the global lower bound zero.

Report a correction for Q6

Question 7 MCQ · 3.0 marks

Consider the following kernel function defined for scalar inputs
Source diagram or notation
:
Source diagram or notation
Which of the following feature maps
Source diagram or notation
satisfies
Source diagram or notation
for all
Source diagram or notation
?
6406537022858.Source diagram or notation
6406537022859.Source diagram or notation
6406537022860.Source diagram or notation
6406537022861.Source diagram or notation

Published solution

For a scalar feature map of the form \(\phi(x)=cx^2\), \[ \phi(x_1)^T\phi(x_2)=c^2x_1^2x_2^2. \] Matching \(10x_1^2x_2^2\) requires \(c^2=10\). The listed valid map is \[ \boxed{\phi(x)=\sqrt{10}\,x^2}. \] A: Produces coefficient 100 rather than 10. B: Produces coefficient 1 rather than 10. C: Produces 10x₁x₂ instead of 10x₁²x₂². D: Correct: multiplying the two features gives exactly the specified kernel.

Report a correction for Q7

Question 8 MSQ · 4.0 marks

Let
Source diagram or notation
be a convex function.Which of the following choices of
Source diagram or notation
Source diagram or notation
that
Source diagram or notation
holds for
Source diagram or notation
convex function
Source diagram or notation
and
Source diagram or notation
Source diagram or notation
?
6406537022862.Source diagram or notation
6406537022863.Source diagram or notation
6406537022864.Source diagram or notation
6406537022865.Source diagram or notation
6406537022866.Source diagram or notation

Published solution

Jensen's inequality applies to a convex combination: \[ \lambda_i\ge0,\qquad \lambda_1+\lambda_2+\lambda_3=1. \] Both \((1/2,1/4,1/4)\) and \((1/3,1/3,1/3)\) meet these conditions. The other choices fail for some convex functions. With \(f(t)=t^2\), choose \((a_1,a_2,a_3)=(1,0,0)\) for A, \((1,1,1)\) for C, and \((0,1,0)\) for D; in each case the proposed inequality is false. A: Has a negative weight; f(t)=t² and (1,0,0) would require 1≤−1. B: Correct: all weights are nonnegative and their sum is 1. C: Weights sum to 3; f(t)=t² and all aᵢ=1 would require 9≤3. D: Has negative weights; f(t)=t² and (0,1,0) would require 25≤−5. E: Correct: equal nonnegative weights sum to 1.

Report a correction for Q8

Question 9 MSQ · 4.0 marks

Assume that
Source diagram or notation
are valid (positive semi-definite) kernels. Which of the following are
Source diagram or notation
valid kernels?
6406537022867.Source diagram or notation
6406537022868.Source diagram or notation
6406537022869.Source diagram or notation
6406537022870.Source diagram or notation

Published solution

**Use closure properties of positive semidefinite kernels.** The RBF kernel satisfies \(K_2(x,x)=1\), so A is \(K_1K_2\), a valid product kernel. For B, expand the exponent: \[ e^{-(\|x\|^2+\|y\|^2)/(2\sigma^2)}e^{x^Ty/\sigma^2} =e^{-\|x-y\|^2/(2\sigma^2)}=K_2(x,y). \] Thus B is the valid sum \(K_1+K_2\). C is the pointwise product of the valid kernel \(K_1+K_2\) with itself. D fails already at \(x=y=0\): \(K_1(0,0)-K_2(0,0)=-1\), whereas a PSD kernel must have a nonnegative diagonal. A: Correct: normalization leaves the RBF unchanged, and its product with the linear kernel is PSD. B: Correct: the exponential product is exactly the RBF kernel, so this is a sum of two PSD kernels. C: Correct: the pointwise square is a kernel product; the Schur product theorem preserves PSD. D: Incorrect: its value at (0,0) is negative, violating PSD.

Report a correction for Q9

Question 10 MSQ · 4.0 marks

Consider a GMM with
Source diagram or notation
components.During the E-step for a single data point
Source diagram or notation
, you are given only the following two quantities for the first component:
Source diagram or notation
where
Source diagram or notation
is the prior mixing weight and
Source diagram or notation
is the posterior responsibility. All other component parameters and densities are unknown. Based strictly on these two values and the mathematical definition of the E-step responsibility,
Source diagram or notation
which of the following quantities can be uniquely determined as exact numerical values?
6406537022871.
The marginal probability density of the data point,
Source diagram or notation
.
6406537022872.
The ratio of the conditional density to the marginal density for component
Source diagram or notation
:
Source diagram or notation
.
6406537022873.
The ratio of the joint probability of component
Source diagram or notation
to the sum of joint
Source diagram or notation
probabilities of all other components: .
6406537022874.
The sum of posterior responsibilities for all components other than
Source diagram or notation
component
Source diagram or notation
:

Published solution

The responsibility equation gives \[ \gamma_1=\frac{\pi_1f(x\mid z=1)}{p(x)}=0.8,\qquad\pi_1=0.2. \] Therefore the following quantities are fixed:
QuantityValue
\(f(x\mid z=1)/p(x)\)\(0.8/0.2=4\)
Joint component-1 density / remaining joint density\(0.8/(1-0.8)=4\)
Sum of remaining responsibilities\(1-0.8=0.2\)
The absolute scale \(p(x)\) cannot be recovered from these two ratios alone. A: Not determined: the supplied information fixes density ratios, not the absolute marginal density. B: Correct: γ₁/π₁=4. C: Correct: γ₁/(1−γ₁)=4. D: Correct: all responsibilities sum to one, leaving 0.2.

Report a correction for Q10

Question 11 NAT · 4.0 marks

Consider a two-component Gaussian Mixture Model (GMM) with mixing weights
Source diagram or notation
and
Source diagram or notation
.For a particular observation
Source diagram or notation
, the component conditional densities satisfy
Source diagram or notation
During the E-step of the EM algorithm, the posterior responsibility of component
Source diagram or notation
is computed as
Source diagram or notation
.Determine the value of
Source diagram or notation
, correct to two decimal places.

Published solution

Write \(\pi_1=p\), so \(\pi_2=1-p\). Since \(f(x\mid1)=3f(x\mid2)\), \[ 0.60=\frac{3p}{3p+(1-p)}=\frac{3p}{1+2p}. \] Hence \(0.6+1.2p=3p\), so \[ p=\frac{0.6}{1.8}=\frac13\approx\boxed{0.33}. \]

Report a correction for Q11

Question 12 NAT · 3.0 marks

Let
Source diagram or notation
be a dataset of
Source diagram or notation
observations where each
Source diagram or notation
.It is given that
Source diagram or notation
The covariance matrix computed from
Source diagram or notation
has eigenvalues
Source diagram or notation
Let
Source diagram or notation
be the direction of maximum variance with
Source diagram or notation
. Find the value of
Source diagram or notation
.

Published solution

The dataset has mean zero. With the covariance convention \[ S=\frac1n\sum_{i=1}^n x^{(i)}x^{(i)T}, \] the requested expression equals \(u^TSu\). A unit direction of maximum variance is an eigenvector for the largest eigenvalue, so \[ u^TSu=\lambda_1=100^{\,2-1}=\boxed{100}. \] The normalization is the \(1/n\) covariance convention used by the question's PCA expression.

Report a correction for Q12