MauryaHub PYQ Practice

Machine Learning Techniques · Quiz 1 · Sep 2024

Machine Learning Techniques · Quiz 1 · Sep 2024

← 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.

12 / 13 published solutions

Question 15 MCQ · 4.0 marks

Source diagram or notation
6406533360624.Source diagram or notation
6406533360625.Source diagram or notation
6406533360626.Source diagram or notation
6406533360627.Source diagram or notation

Published solution

**1. Construct features for the first function:** Set \(\phi(x)=(x_1,x_2,x_1+x_2)\). Then \(k_1(x,y)=\phi(x)^T\phi(y)\), proving validity. **2. Test the second function:** Its extra term is \(x_1^2+y_2^2+3\), which is not symmetric under swapping x and y. For x=(1,0), y=(0,0), k2(x,y)=4 while k2(y,x)=3. Therefore k2 is not a real inner-product kernel. **Answer: B — k1 is valid; k2 is not.** A: **Incorrect:** The second function fails symmetry. B: **Correct:** The explicit feature map proves k1 valid, while the counterexample excludes k2. C: **Incorrect:** It reverses the validity conclusions. D: **Incorrect:** The first function has an explicit inner-product representation.

Report a correction for Q15

Question 16 MCQ · 4.0 marks

Source diagram or notation
6406533360630.Source diagram or notation
6406533360631.Source diagram or notation
6406533360632.Source diagram or notation
6406533360633.Source diagram or notation

Published solution

**1. Expand the desired kernel:** \[(x^Ty)^2+1=x_1^2y_1^2+2x_1x_2y_1y_2+x_2^2y_2^2+1.\] **2. Match the features:** Taking \(\phi(x)=(x_1^2,\sqrt2x_1x_2,x_2^2,1)^T\) reproduces each term; √2 in each feature yields the coefficient 2. **Answer: A — \(\phi(x)=(x_1^2,\sqrt2x_1x_2,x_2^2,1)^T\).** A: **Correct:** Its inner product equals the expanded kernel exactly. B: **Incorrect:** The x1+x2 feature introduces unwanted linear and cross terms. C: **Incorrect:** Its features have incorrect degrees and do not reproduce the polynomial. D: **Incorrect:** It gives first-degree coordinate products and a cross coefficient of 1.

Report a correction for Q16

Question 17 MCQ · 3.0 marks

Source diagram or notation
6406533360628.
yes
6406533360629.
No

Published solution

**1. Distinguish input and feature spaces:** A nonlinear kernel maps d-dimensional inputs to a feature space whose dimension may exceed d, even be infinite. **2. Apply the sample bound:** Centered kernel PCA has at most n−1 nonzero components, further limited by feature-space rank. Thus k>d is possible when there are enough independent mapped observations. **Answer: A — Yes.** **Convention note:** This is a possibility, not a guarantee: k cannot exceed the centered Gram matrix rank. A: **Correct:** The feature-space rank can exceed the original input dimension. B: **Incorrect:** The input dimension does not bound the rank of a nonlinear feature map.

Report a correction for Q17

Question 18 MSQ · 4.0 marks

Source diagram or notation
6406533360619.Source diagram or notation
6406533360620.Source diagram or notation
6406533360621.Source diagram or notation
6406533360622.Source diagram or notation

Published solution

**1. Project onto the unit direction:** The reconstruction is \(\hat x_i=(x_i^Tw)w\), so the residual is \(r_i=x_i-(x_i^Tw)w\). **2. Express mean squared reconstruction error:** \[E=\frac1n\sum_i\|r_i\|^2=\frac1n\sum_i r_i^Tr_i.\] These are A and B. **3. Expand using unit length:** \(\|r_i\|^2=x_i^Tx_i-(x_i^Tw)^2\). The projected squared coordinate itself measures retained energy, not reconstruction error. **Answer: A, B — A and B.** A: **Correct:** This is the mean squared residual norm. B: **Correct:** This is the identical residual expressed as an inner product. C: **Incorrect:** It adds projected energy; the correct expansion subtracts it. D: **Incorrect:** This measures mean squared projection length rather than discarded residual energy.

Report a correction for Q18

Question 19 MSQ · 5.0 marks

Source diagram or notation
6406533360643.Source diagram or notation
6406533360644.Source diagram or notation
6406533360645.Source diagram or notation
6406533360646.Source diagram or notation

Published solution

**1. Compare the only two likelihoods:** For samples in (0,1), \(L(-1)=\prod_i5x_i^4\), while \(L(1)=\prod_i1=1\). **2. Select the larger:** If the product is below 1, θ=1 wins; if above 1, θ=−1 wins. At equality both maximize the likelihood. **Answer: A, D — A and D.** **Convention note:** The argument assumes observations lie in the common support (0,1). A: **Correct:** A product below 1 makes L(1)=1 larger. B: **Incorrect:** A product above 1 makes θ=−1 more likely, not θ=1. C: **Incorrect:** A product below 1 makes θ=1 more likely, not θ=−1. D: **Correct:** A product above 1 makes L(−1) larger.

Report a correction for Q19

Question 20 NAT · 3.0 marks

Source diagram or notation

Published solution

**1. Sum total variance:** The eigenvalues total \(30+10+10+0+0=50\). **2. Sum the largest two:** They capture \(30+10=40\). The tie for second place does not change the sum. **3. Convert to percent:** \(40/50\times100=80\%\). **Answer: 80.**

Report a correction for Q20

Question 21 NAT · 5.0 marks

Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q21

Question 22 NAT · 4.0 marks

Source diagram or notation

Published solution

**1. Use the weighted-mean M-step:** \(\mu_k^{new}=\sum_i\lambda_k^ix_i/\sum_i\lambda_k^i\). **2. Calculate the two sums:** The numerator is \(0.3(1)+0.1(1.2)+2.5(2)+0.6(1.5)+0.8(0.5)=6.72\). The denominator is \(0.3+0.1+2.5+0.6+0.8=4.3\). **3. Divide:** \(\mu_k^{new}=6.72/4.3\approx1.562791\), or 1.56. **Answer: 1.56.** **Convention note:** The printed value 2.5 cannot be a standard GMM responsibility, which must lie in [0,1]. The result follows the intended weighted-mean arithmetic using the supplied positive weights; the data are not a valid responsibility table as written.

Report a correction for Q22

Question 23 NAT · 4.0 marks

Consider a dataset with 100 total data points. Each data point is classified as either type A or type B. We model this using a Bernoulli distribution, where p is the probability of a data point being type A. If the maximum likelihood estimate (MLE) of p based on the dataset is 0.4, how many data points of type B are there in this dataset?

Published solution

**1. Use the Bernoulli MLE:** \(\hat p=n_A/n=0.4\). With n=100, \(n_A=40\). **2. Count the other category:** \(n_B=100-40=60\). **Answer: 60.**

Report a correction for Q23

Question 24 NAT · 3.0 marks

Source diagram or notationSource diagram or notation

Published solution

**1. Normalize the line direction:** Although the printed w=(1,1) is not unit length, the line’s unit direction is \(u=w/\|w\|=(1,1)/\sqrt2\). **2. Compute the projection length:** \(|u^Tx|=|(3+4)/\sqrt2|=7/\sqrt2\approx4.949747\), giving 4.95. **Answer: 4.95.**

Report a correction for Q24

Question 25 NAT · 4.0 marks

Source diagram or notationSource diagram or notation

Published solution

**1. Find the vector projection:** \(\hat x=w(w^Tx)/(w^Tw)=(1,1)(7/2)=(3.5,3.5)\). **2. Form the residual:** \(x-\hat x=(-0.5,0.5)\). **3. Take its norm:** \(\|x-\hat x\|=\sqrt{0.25+0.25}=1/\sqrt2\approx0.707107\), or 0.71. This asks for the norm, not its square 0.5. **Answer: 0.71.**

Report a correction for Q25

Question 26 MCQ · 3.0 marks

Source diagram or notation
Based on the above data, answer the given subquestions.
Source diagram or notation
6406533360634.
(0,1)
6406533360635.
(2,3)
6406533360636.
(3,2)
6406533360637.
(2,4)

Published solution

**1. Compute squared distances from the first seed (2,1):** In the listed point order (0,1),(1,0),(1,2),(2,1),(2,3),(2,4),(3,2), the scores are 4,2,2,0,4,9,2. **2. Apply the question’s maximum-score rule:** The largest score is 9 at (2,4), so this point is the second seed. **Answer: D — (2,4).** **Convention note:** Standard K-means++ samples from normalized scores; this question specifically selects the largest score deterministically. A: **Incorrect:** Its score is 4, below the maximum 9. B: **Incorrect:** Its score is 4, below the maximum 9. C: **Incorrect:** Its score is 2, below the maximum 9. D: **Correct:** Its score 9 is the unique maximum.

Report a correction for Q26

Question 27 MCQ · 4.0 marks

Source diagram or notation
Based on the above data, answer the given subquestions.
Which point has the lowest probability of being chosen as the 3rd cluster mean? Use squared distance to calculate the scores.
6406533360638.
(1,0)
6406533360639.
(2,3)
6406533360640.
(3,2)
6406533360641.
(1,2)       **MLP** **Section Id :** 64065369402 **Section Number :** 3 **Section type :** Online **Mandatory or Optional :** Mandatory **Number of Questions :** 18 **Number of Questions to be attempted :** 18 **Section Marks :** 50 **Display Number Panel :** Yes **Section Negative Marks :** 0 **Group All Questions :** No **Enable Mark as Answered Mark for Review and** No **Clear Response :** **Section Maximum Duration :** 0 **Section Minimum Duration :** 0 **Section Time In :** Minutes **Maximum Instruction Time :** 0

Published solution

**1. Use both selected seeds:** They are (2,1) and (2,4). Each candidate’s weight is its squared distance to the nearer seed. **2. Evaluate the offered points:** The weights of (1,0),(2,3),(3,2),(1,2) are respectively 2,1,2,2. The omitted unselected point (0,1) has weight 4, giving total weight 11. **3. Normalize or compare:** The offered probabilities are 2/11,1/11,2/11,2/11; therefore (2,3) has the smallest. **Answer: B — (2,3).** **Convention note:** Already selected seeds have weight zero and are excluded from new-seed candidates. A: **Incorrect:** Its nearest-seed squared distance is 2. B: **Correct:** Its nearest-seed squared distance is 1, the smallest offered weight. C: **Incorrect:** Its nearest-seed squared distance is 2. D: **Incorrect:** Its nearest-seed squared distance is 2.

Report a correction for Q27