MauryaHub PYQ Practice

Machine Learning Foundations · Quiz 2 · Sep 2024

Machine Learning Foundations · Quiz 2 · Sep 2024

← Course papers · Start practice / exam

This page contains the reliably extracted subset, not the complete original paper.

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

13 / 15 published solutions

Question 65 MSQ · 3.0 marks

Source diagram or notation
**Note:** B\(^{H}\) is a conjugate transpose of B.
6406533457284.Source diagram or notation
6406533457285.Source diagram or notation
6406533457286.Source diagram or notation
6406533457287.Source diagram or notation

Published solution

**1. Check conjugate symmetry:** A matrix is Hermitian when \(B_{jk}=\overline{B_{kj}}\). Here the diagonal is real, the entries \(-2i,2i\) and \(-i,i\) are conjugate pairs, and the remaining off-diagonal pair is \(-1,-1\). Thus \(B=B^H\). **2. Use the spectral consequence:** Every eigenvalue of a Hermitian matrix is real. For an eigenpair \(Bv=\lambda v\), the quantity \(v^HBv\) is real and equals \(\lambda\|v\|^2\), forcing \(\lambda\in\mathbb R\). **3. Check the other numerical claims:** The first diagonal entry of \(B^2\) is \(4^2+(-2i)(2i)+(-1)^2=21\), whereas that of \(-B^H\) is \(-4\). Also, direct determinant expansion gives \(\det B=-16\ne0\). **Answer: B, C — B is Hermitian and all its eigenvalues are real.** A: **Incorrect:** The (1,1) entries 21 and −4 already disprove this matrix equality. B: **Correct:** Conjugating and transposing reproduces every entry of B. C: **Correct:** The Hermitian spectral theorem guarantees real eigenvalues. D: **Incorrect:** The determinant is −16, so the matrix is nonsingular.

Report a correction for Q65

Question 66 MSQ · 3.0 marks

Source diagram or notation
6406533457312.Source diagram or notation
6406533457313.Source diagram or notation
6406533457314.Source diagram or notation
6406533457315.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q66

Question 67 MCQ · 3.0 marks

Source diagram or notation
6406533457288.Source diagram or notation
6406533457289.Source diagram or notation
6406533457290.Source diagram or notation
6406533457291.Source diagram or notation

Published solution

**1. Separate the diagonal shift:** Write \(A=2I+H\), where \(H\) has zero diagonal. Direct expansion gives \(\det(tI-H)=t(t^2-3)\), so the eigenvalues of \(H\) are \(0,\sqrt3,-\sqrt3\). **2. Shift the eigenvalues:** Adding \(2I\) shifts each eigenvalue by 2. Therefore \[\Lambda=\operatorname{diag}(2,2+\sqrt3,2-\sqrt3).\] Their sum is 6, agreeing with the trace of A. **3. Use Hermitian diagonalization:** Conjugate symmetry ensures an orthonormal complex eigenbasis, giving \(A=Q\Lambda Q^H\). **Answer: B — diagonal eigenvalues 2, 2+√3, 2−√3.** **Convention note:** The printed decomposition uses Q transposed. For this complex Hermitian matrix the spectral decomposition requires the conjugate transpose Q^H; the answer follows that intended correction. A: **Incorrect:** These eigenvalues sum to 9, whereas the trace is 6. B: **Correct:** These are exactly the three shifted eigenvalues. C: **Incorrect:** These eigenvalues sum to 7, contradicting the trace. D: **Incorrect:** A is Hermitian and hence unitarily diagonalizable.

Report a correction for Q67

Question 68 MCQ · 3.0 marks

Source diagram or notation
6406533457304.Source diagram or notation
6406533457305.Source diagram or notation
6406533457306.Source diagram or notation
6406533457307.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q68

Question 69 MCQ · 3.0 marks

Source diagram or notation
6406533457308.Source diagram or notation
6406533457309.Source diagram or notation
6406533457310.Source diagram or notation
6406533457311.Source diagram or notation

Published solution

**1. Match the quadratic-form convention:** For symmetric \(M\), \[\begin{pmatrix}x&y&z\end{pmatrix}M\begin{pmatrix}x\\y\\z\end{pmatrix}=m_{11}x^2+m_{22}y^2+m_{33}z^2+2m_{12}xy+2m_{13}xz+2m_{23}yz.\] **2. Read the coefficients:** The diagonal is \((3,2,1)\). Halving the cross-term coefficients gives \(m_{12}=2,m_{13}=1,m_{23}=2\), hence \[M=\begin{pmatrix}3&2&1\\2&2&2\\1&2&1\end{pmatrix}.\] **Answer: A — the symmetric matrix with rows (3,2,1), (2,2,2), (1,2,1).** A: **Correct:** Its diagonal and twice each off-diagonal entry reproduce every term. B: **Incorrect:** Its xz coefficient is 4 rather than 2. C: **Incorrect:** It gives x² coefficient 2, xy coefficient 6 and yz coefficient 2. D: **Incorrect:** Option A provides the required symmetric matrix.

Report a correction for Q69

Question 70 MCQ · 3.0 marks

Source diagram or notation
6406533457316.Source diagram or notation
6406533457317.Source diagram or notation
6406533457318.Source diagram or notation
6406533457319.Source diagram or notation

Published solution

**1. Differentiate and specify the update:** \(\nabla f(x,y)=(6x-6y,-6x+2y)\), and \(z_{t+1}=z_t-\eta_t\nabla f(z_t)\), with the first learning rate \(\eta_1=1\). The constant 4 contributes no gradient. **2. First update:** At \((1,2)\), the gradient is \((-6,-2)\). Thus the new point is \((1,2)-(-6,-2)=(7,4)\). **3. Second update:** Evaluate the gradient at the new point, obtaining \((18,-34)\). Since \(\eta_2=1/4\), \[(7,4)-\tfrac14(18,-34)=(2.5,12.5).\] **Answer: B — (2.5,12.5).** **Convention note:** The Hessian is indefinite, so these valid two updates do not imply convergence to a global minimum. A: **Incorrect:** This is the point after only the first update. B: **Correct:** It uses the new gradient and the second learning rate 1/4. C: **Incorrect:** It does not result from either stated gradient update. D: **Incorrect:** It does not follow the stated learning-rate schedule.

Report a correction for Q70

Question 71 MCQ · 3.0 marks

Source diagram or notation
6406533457320.
(3,7)
6406533457321.
(0.4, 1.8)
6406533457322.
(0,0)
6406533457323.
(-1,0)

Published solution

**1. Parameterize the feasible points:** Every point on the line is \((t,2t+1)\). Minimize squared distance instead of distance because squaring preserves the minimizer: \(D(t)=(t-4)^2+(2t+1)^2\). **2. Find the minimum:** \(D\prime(t)=10t-4=0\) gives \(t=0.4\). Since \(D\prime\prime(t)=10>0\), this is the unique minimum. **3. Recover the coordinates:** The y coordinate is \(2(0.4)+1=1.8\), so the nearest point is \((0.4,1.8)\). Its displacement from (4,0) is perpendicular to the line direction (1,2). **Answer: B — (0.4,1.8).** A: **Incorrect:** It lies on the line but is farther from (4,0). B: **Correct:** It satisfies the line equation and the perpendicularity condition. C: **Incorrect:** It does not satisfy y=2x+1. D: **Incorrect:** For x=−1 the line requires y=−1, not 0.

Report a correction for Q71

Question 72 MCQ · 2.0 marks

Source diagram or notation
Based on the above data answer the given subquestions.
Which of the following options is/are true?
6406533457292.Source diagram or notation
6406533457293.Source diagram or notation
6406533457294.Source diagram or notation
6406533457295.Source diagram or notation

Published solution

**1. Find the left singular directions:** For \(A=\begin{pmatrix}1&0&1\\-1&1&0\end{pmatrix}\), \[AA^T=\begin{pmatrix}2&-1\\-1&2\end{pmatrix}.\] Its eigenvalues are 3 and 1, with eigenvectors (1,−1) and (1,1). **2. Normalize and order the columns:** Their norms are both \(\sqrt2\). In descending singular-value order, \[Q_1=\frac1{\sqrt2}\begin{pmatrix}1&1\\-1&1\end{pmatrix}.\] Each column has unit norm and the columns are orthogonal. **Answer: B — Q₁ = (1/√2) times the matrix with rows (1,1), (−1,1).** A: **Incorrect:** The directions are correct but the columns have norm √2 rather than 1. B: **Correct:** It contains normalized eigenvectors of AA transposed in the required order. C: **Incorrect:** Its columns are identical, so they cannot be orthonormal. D: **Incorrect:** Multiplication by √2 makes the column norms 2.

Report a correction for Q72

Question 73 MCQ · 2.0 marks

Source diagram or notation
Based on the above data answer the given subquestions.
Which of the following options is/are true ?
6406533457296.Source diagram or notation
6406533457297.Source diagram or notation
6406533457298.Source diagram or notation
6406533457299.Source diagram or notation

Published solution

**1. Use the singular-vector relation:** The left singular vectors are \(u_1=(1,-1)^T/\sqrt2\) and \(u_2=(1,1)^T/\sqrt2\), with singular values \(\sqrt3\) and 1. Thus \[v_1=\frac{A^Tu_1}{\sqrt3}=\frac{(2,-1,1)^T}{\sqrt6},\qquad v_2=A^Tu_2=\frac{(0,1,1)^T}{\sqrt2}.\] **2. Complete the orthonormal basis:** Solving \(Av_3=0\) gives a vector proportional to \((-1,-1,1)\); normalize it by \(\sqrt3\). This vector is orthogonal to the first two. **3. Place these vectors as rows:** \[Q_2^T=\frac1{\sqrt6}\begin{pmatrix}2&-1&1\\0&\sqrt3&\sqrt3\\-\sqrt2&-\sqrt2&\sqrt2\end{pmatrix}.\] **Answer: D — Q₂ transposed with rows (2,−1,1)/√6, (0,1,1)/√2, (−1,−1,1)/√3.** A: **Incorrect:** Its third row has squared norm 5/6 and is not a unit vector. B: **Incorrect:** Its third row is not in the null space of A. C: **Incorrect:** Its third row is not orthogonal to the second row and is not a null vector. D: **Correct:** All rows are orthonormal and the last row spans the null space.

Report a correction for Q73

Question 74 MCQ · 2.0 marks

Source diagram or notation
Based on the above data answer the given subquestions.
Which of the following options is true?
6406533457300.Source diagram or notation
6406533457301.Source diagram or notation
6406533457302.Source diagram or notation
6406533457303.Source diagram or notation

Published solution

**1. Compute the singular values:** The eigenvalues of \(AA^T=\begin{pmatrix}2&-1\\-1&2\end{pmatrix}\) are 3 and 1. Singular values are their nonnegative square roots, giving \(\sqrt3\) and 1. **2. Preserve the rectangular shape:** A is 2 by 3, so its full SVD has \[\Sigma=\begin{pmatrix}\sqrt3&0&0\\0&1&0\end{pmatrix}.\] The extra zero column accounts for the one-dimensional right null space. **Answer: A — Σ with diagonal singular values √3 and 1.** A: **Correct:** It has the correct shape and both square-root eigenvalues. B: **Incorrect:** It uses 3 instead of its square root. C: **Incorrect:** It incorrectly replaces the first singular value by 1. D: **Incorrect:** It incorrectly replaces the second singular value by √3.

Report a correction for Q74

Question 75 MCQ · 3.0 marks

Source diagram or notation
Based on the above data answer the given subquestions.
Source diagram or notation
6406533457324.Source diagram or notation
6406533457325.Source diagram or notation
6406533457326.Source diagram or notation
6406533457327.Source diagram or notation

Published solution

**1. Center the observations:** The mean of (2,1), (4,3), (6,5) is \(\mu=(4,3)\). The centered observations are \((-2,-2),(0,0),(2,2)\). **2. Sum their outer products:** \[\sum_{j=1}^3(x_j-\mu)(x_j-\mu)^T=\begin{pmatrix}8&8\\8&8\end{pmatrix}.\] **3. Apply the convention used by the options:** With empirical PCA divisor \(n=3\), \[C=\frac13\begin{pmatrix}8&8\\8&8\end{pmatrix}.\] **Answer: A — (1/3) times the matrix whose four entries are 8.** **Convention note:** Although the question says sample covariance, its options use the empirical PCA divisor n. The unbiased sample covariance divides by n−1 and would instead have all entries 4; that matrix is absent. A: **Correct:** It is the centered scatter matrix divided by the three observations. B: **Incorrect:** Its entries are half the correct empirical covariance. C: **Incorrect:** The observations vary together, so the covariance is not zero. D: **Incorrect:** Its entries are one quarter of the correct empirical covariance.

Report a correction for Q75

Question 76 MCQ · 3.0 marks

Source diagram or notation
Based on the above data answer the given subquestions.
Source diagram or notation
6406533457328.Source diagram or notation
6406533457329.Source diagram or notation
6406533457330.Source diagram or notation
6406533457331.Source diagram or notation

Published solution

**1. Form the covariance matrix:** Centering the three observations gives \((-2,-2),(0,0),(2,2)\). Under the divisor-3 PCA convention, \(C=\frac83\begin{pmatrix}1&1\\1&1\end{pmatrix}\). **2. Identify the eigenvectors:** Multiplication by C sends \((1,1)^T\) to \(\frac{16}3(1,1)^T\), and sends \((1,-1)^T\) to zero. Therefore the eigenvalues are \(16/3\) and 0. **3. Interpret the zero value:** All centered data lie on one line, so there is variance in only one principal direction. The eigenvalues also sum to the trace, 16/3. **Answer: D — 16/3 and 0.** **Convention note:** This follows the empirical covariance convention used by the preceding question; using divisor n−1 would give eigenvalues 8 and 0. A: **Incorrect:** 16 is the nonzero eigenvalue of the unnormalized scatter matrix. B: **Incorrect:** 4 is not the nonzero eigenvalue of the stated covariance. C: **Incorrect:** 1 does not agree with the covariance trace. D: **Correct:** These values agree with both direct multiplication and the trace.

Report a correction for Q76

Question 77 MCQ · 3.0 marks

Source diagram or notation
Based on the above data answer the given subquestions.
Source diagram or notation
6406533457332.Source diagram or notation
6406533457333.Source diagram or notation
6406533457334.Source diagram or notation
6406533457335.Source diagram or notation

Published solution

**1. Find the first principal direction:** With mean \(\mu=(4,3)\), every centered point is a multiple of \(u=(1,1)^T/\sqrt2\). Their scalar PC scores are \(-2\sqrt2,0,2\sqrt2\). **2. Project and reconstruct:** The two-dimensional reconstruction from one component is \(\hat x=\mu+uu^T(x-\mu)\). Since each centered point already lies in the span of u, \(uu^T(x-\mu)=x-\mu\). **3. Read the requested point coordinates:** Reconstruction returns exactly \((2,1),(4,3),(6,5)\); no variation is lost by keeping the first component. **Answer: A — (2,1), (4,3), (6,5).** **Convention note:** The offered two-dimensional points are interpreted as PCA projections with the mean restored. The one-dimensional scores themselves are −2√2, 0 and 2√2; raw projection of uncentered vectors is a different operation. A: **Correct:** All three original observations lie on the affine first-principal-component line. B: **Incorrect:** These points do not reconstruct the centered observations along the principal direction. C: **Incorrect:** These are neither the PC scores nor the mean-restored projected points. D: **Incorrect:** This projects onto the horizontal axis instead of the first principal direction.

Report a correction for Q77

Question 78 MSQ · 2.0 marks

Source diagram or notation
6406533457336.
M is an invertible matrix.
6406533457337.
M is a singular matrix.
6406533457338.
The determinant of M is 4.
6406533457339.
M is diagonalizable.

Published solution

**1. Test invertibility:** \(\det M=2\cdot2-4\cdot1=0\). The second column is twice the first, so M has rank one and is singular. **2. Test diagonalizability separately:** \(\det(\lambda I-M)=\lambda(\lambda-4)\). The distinct eigenvalues 0 and 4 have independent eigenvectors, for example \((-2,1)^T\) and \((2,1)^T\). Thus M is diagonalizable despite being singular. **Answer: B, D — singular and diagonalizable.** A: **Incorrect:** A zero determinant rules out an inverse. B: **Correct:** Dependent columns make the determinant zero. C: **Incorrect:** The determinant is 0, while 4 is the trace and the nonzero eigenvalue. D: **Correct:** Two distinct eigenvalues give an eigenbasis in dimension two.

Report a correction for Q78

Question 79 MCQ · 2.0 marks

Source diagram or notation
6406533457340.
A is positive definite.
6406533457341.
A is positive semi-definite.
6406533457342.
A is negative definite.
6406533457343.
A is negative semi-definite.       **Java** **Section Id :** 64065373860 **Section Number :** 6 **Section type :** Online **Mandatory or Optional :** Mandatory **Number of Questions :** 16 **Number of Questions to be attempted :** 16 **Section Marks :** 100 **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. Factor the quadratic form:** \[\begin{pmatrix}x&y\end{pmatrix}\begin{pmatrix}1&4\\4&16\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}=x^2+8xy+16y^2=(x+4y)^2\ge0.\] **2. Distinguish definite from semidefinite:** The nonzero vector \((-4,1)\) gives value zero, so strict positive definiteness fails. Equivalently, the matrix is \(vv^T\) for \(v=(1,4)^T\), with eigenvalues 17 and 0. **Answer: B — positive semidefinite.** A: **Incorrect:** A nonzero vector can give quadratic-form value zero. B: **Correct:** The quadratic form is always nonnegative, with a nontrivial null direction. C: **Incorrect:** For (1,0) the quadratic form is positive, contradicting negative definiteness. D: **Incorrect:** The positive value at (1,0) rules out negative semidefiniteness.

Report a correction for Q79