Which among the following is true with respect to the Lloyds’ algorithm?
It always converges.
It may fail to converge for an initialization while it may converge for otherinitialization.
It is sensitive to outliers.
The solution produced is always the optimal.
Q2MSQ4 marksselect all that apply
There will be 50 non-zero eigenvalues of the covariance matrix.
There will be 6 non-zero eigenvalues of the covariance matrix.
Using the first 5 principal components, the dataset can be reconstructed withzero residue.
The variance captured by the top 6 principal components equals the totalvariance of the dataset.
Q3MSQ4 marksselect all that apply
The points (0, 2), (2, 0), and (2, 2) have the equal probability of being chosen asthe second cluster center.
The probability of selecting (2, 2) as the second cluster center is twice that ofselecting (0, 2).
If (2, 2) is chosen as the second cluster center, the algorithm will alwaysconverge in one iteration.
The tie-breaking rule will affect the final cluster centers.
Q4MSQ4 marksselect all that apply
Posterior mean for Beta(1, 1) is 0.039.
Posterior mean for Beta(1, 1) is 0.03.
Posterior mean for Beta(0.5, 0.5) is 0.025.
Posterior mean for Beta(0.5, 0.5) is 0.034.
Q5MSQ3 marksselect all that apply
Which of the following are valid kernel functions? Select all that apply.
Q6SA3 marks
Q7SA3 marks
Comprehension passage - the questions below it refer to this
Based on the above data, answer the given subquestions.
Q8MCQ2 marks
What is the covariance matrix of the dataset?
Q9SA2 marks
If standard PCA is performed on this dataset, what is the variance along the first principal component? Enter the answer correct to one decimal place.
Q10SA2 marks
If standard PCA is performed on this dataset, what is the variance along the second principal component? Enter the answer correct to one decimal place.
Comprehension passage - the questions below it refer to this
Based on the above data, answer the given subquestions.
Q11MCQ3 marks
Q12SA3 marks
Comprehension passage - the questions below it refer to this
Based on the above data, answer the given subquestions.
Q13MCQ3 marks
Perform K-means clustering with K = 2 and initial cluster centers at (−2, 3) and (2,−1). What are the final means of clusters after convergence?
Q14SA2 marks
Suppose we introduce a new data point (0, 0) to the existing dataset and perform K means with the same initial cluster centers. How many iterations would it require now for convergence?
Auto-generated summary from the source site. Handy as a checklist; the lessons above explain each idea from scratch.
Here's a comprehensive summary of the core topics, concepts, principles, and equations essential for the "Machine Learning Techniques" exam, derived from the provided questions.
This exam focuses heavily on Unsupervised Learning techniques, particularly Clustering and Dimensionality Reduction, alongside foundational Mathematical Concepts from linear algebra, probability, and statistics.
1. Unsupervised Learning: Clustering
1.1 K-Means Clustering (Lloyd's Algorithm)
Concept: An iterative partitioning algorithm that aims to partition N data points into K clusters, where each data point belongs to the cluster with the nearest mean (centroid).
Principles:
Algorithm Steps:
Initialization: Choose K initial cluster centroids.
Assignment Step (E-step-like): Assign each data point to the cluster whose centroid is closest, typically using squared Euclidean distance.
Update Step (M-step-like): Recalculate the centroids as the mean of all data points assigned to that cluster.
Convergence: Repeat steps 2 and 3 until cluster assignments no longer change or centroids do not move significantly.
Properties:
Convergence: Always converges in a finite number of iterations to a local optimum of the objective function.
Sensitivity to Initialization: The final clustering result can vary significantly based on the initial placement of centroids.
Sensitivity to Outliers: Highly sensitive to outliers due to its reliance on means and squared Euclidean distance, which heavily penalizes large distances.
Optimality: Does not guarantee finding the global optimal clustering.
Equations:
Squared Euclidean Distance: For points x=(x1,…,xD) and y=(y1,…,yD):
∣∣x−y∣∣2=j=1∑D(xj−yj)2
K-Means Objective Function (Sum of Squared Errors - SSE):
J=k=1∑Kx∈Ck∑∣∣x−μk∣∣2
where Ck is the set of points in cluster k, and μk is the centroid of cluster k.
Centroid Update:
μk=∣Ck∣1x∈Ck∑x
1.2 K-Means++ Initialization
Concept: A smart initialization technique for K-Means that selects initial centroids to be far apart, improving the chance of finding a better local optimum.
Principles:
Randomly choose the first center from the data points.
For each subsequent center, choose a data point x with probability proportional to its squared distance D(x)2 from the closest existing center.
This probabilistic selection biases towards choosing points that are far from already chosen centroids.
Equations:
Probability of selecting next center x:
P(x)=∑x′∈dataD(x′)2D(x)2
where D(x)=minj=1,…,l−1(∣∣x−μj0∣∣) and μj0 are the already chosen initial cluster centers.
1.3 Gaussian Mixture Models (GMM) and Expectation-Maximization (EM) Algorithm
Concept: A probabilistic model that assumes data points are generated from a mixture of several Gaussian distributions with unknown parameters (means, covariances, and mixing weights). The EM algorithm is used to estimate these parameters.
Principles:
GMM Likelihood: For a dataset X={x1,…,xN} and K Gaussian components, the likelihood function for parameters θ={πk,μk,Σk}k=1K is:
L(θ;X)=i=1∏Nk=1∑KπkN(xi∣μk,Σk)
where πk are the mixing coefficients (prior probabilities of components), and N(xi∣μk,Σk) is the probability density function (PDF) of the k-th Gaussian component.
EM Algorithm: An iterative optimization algorithm for finding maximum likelihood estimates of parameters in probabilistic models, especially when the model depends on unobserved latent variables.
E-step (Expectation): Calculate the "responsibilities" (posterior probabilities) that each data point belongs to each component, given the current parameter estimates.
M-step (Maximization): Update the parameters (means, covariances, mixing weights) to maximize the expected log-likelihood found in the E-step.
Equations:
1D Gaussian PDF:
N(x∣μ,σ2)=σ2π1exp(−21(σx−μ)2)
Responsibility λik (posterior probability for data point xi belonging to component k):
Concept: A linear dimensionality reduction technique that transforms data to a new coordinate system such that the greatest variance by any projection of the data lies on the first coordinate (first principal component), the second greatest variance on the second coordinate, and so on.
Principles:
Covariance Matrix: PCA is based on the eigenvalue decomposition of the data's covariance matrix.
Principal Components: The principal components are the eigenvectors of the covariance matrix, ordered by their corresponding eigenvalues in descending order.
Variance Explained: Each eigenvalue represents the amount of variance captured along its corresponding principal component.
Intrinsic Dimensionality: If a dataset inherently lies in a k-dimensional linear subspace, then its covariance matrix will have k non-zero eigenvalues, and k principal components are sufficient to reconstruct the data with zero error.
Reconstruction Error: When reducing dimensionality, the reconstruction error relates to the variance not captured by the selected principal components. Zero residue implies all variance is captured.
Equations:
Mean Vector: For a dataset X∈RN×D where N is the number of samples and D is the number of features, the mean of feature j is:
xˉj=N1i=1∑NXij
Mean-Centered Data Matrix:Xcentered=X−mean(X) (each row has mean subtracted).
Sample Covariance Matrix: For mean-centered data Xcentered:
Σ=N−11XcenteredTXcentered
(Often 1/N is used in ML contexts for population covariance, or when treating X as a population.) For a 2D dataset with points (xi,yi):
Eigenvalue Decomposition:Σv=λv, where λ is an eigenvalue and v is an eigenvector.
Proportion of Variance Explained (PVE) by j-th principal component:
PVEj=∑i=1Dλiλj
where λj is the eigenvalue for the j-th principal component and ∑i=1Dλi is the total variance.
3. Kernel Functions
Concept: Functions that compute the inner product between two vectors in a high-dimensional feature space, without explicitly transforming the data into that space (the "kernel trick"). Used in algorithms like SVMs and Kernel PCA to handle non-linear relationships.
Principles:
A function K(x,y) is a valid kernel if it corresponds to an inner product in some high-dimensional feature space, i.e., K(x,y)=ϕ(x)Tϕ(y) for some mapping ϕ.
Mercer's Theorem: Provides formal conditions for a function to be a valid kernel (the kernel matrix must be positive semi-definite).
Common Valid Kernels:
Radial Basis Function (RBF) / Gaussian Kernel:
K(x,y)=exp(−2σ2∣∣x−y∣∣2)orK(x,y)=exp(−γ∣∣x−y∣∣2)
where σ>0 (or γ>0) is a bandwidth parameter.
Polynomial Kernel:
K(x,y)=(x⋅y+c)d
where c≥0 is a constant and d∈N is the degree of the polynomial.
Linear Kernel:
K(x,y)=x⋅y
Non-Valid Kernels (Example):
K(x,y)=∣∣x−y∣∣ (absolute distance) is generally not a valid kernel as it does not typically correspond to an inner product.
4. Bayesian Inference (Beta-Binomial Model)
Concept: A framework for updating beliefs about parameters of a distribution using observed data. The Beta-Binomial model is a common example of a conjugate prior relationship.
Principles:
Bayes' Theorem: Relates the posterior probability of a parameter (θ) given data (D) to the likelihood of the data given the parameter and the prior probability of the parameter.
P(θ∣D)=P(D)P(D∣θ)P(θ)
Conjugate Prior: When the posterior distribution is in the same family as the prior distribution. For a Binomial likelihood, the Beta distribution is a conjugate prior.
Beta Distribution: A continuous probability distribution defined on the interval [0,1], often used to model probabilities or proportions.
Binomial Distribution: A discrete probability distribution of the number of successes in a sequence of n independent yes/no experiments.
Equations:
Beta Prior Distribution:θ∼Beta(a,b)
Binomial Likelihood: Given k successes in n trials: P(k∣n,θ)∼Binomial(n,θ)
Beta Posterior Distribution: Given a Beta(a,b) prior and observing k successes in n trials, the posterior is:
θ∣k,n∼Beta(a+k,b+n−k)
Expected Value of a Beta Distribution: For Beta(α,β):
E[θ]=α+βα
Posterior Mean: The expected value of the posterior distribution, used as an estimate for θ: