Sample questions
Question 1Easy
Which of the following is an unsupervised learning method?
- Linear regression
- Logistic regression
- Decision tree classifier
- k-means clustering
Answer: D. k-means clustering
Explanation
k-means finds groups in unlabelled data. The other three need a target variable.
Step-by-step solution
- Unsupervised learning finds structure in data that has no labels.
- k-means groups unlabelled points into k clusters.
- Linear regression, logistic regression and decision tree classifier all learn from labelled targets, so the answer is k-means clustering.
Why the other options are wrong
- A. Linear regression is supervised: it learns from known target values.
- B. Logistic regression is supervised: it learns from labelled classes.
- C. A decision tree classifier is supervised: it learns from labelled examples.
Tip: Labels present = supervised; no labels = unsupervised (clustering, dimensionality reduction).
Question 2Easy
Which technique is mainly used for dimensionality reduction?
- Logistic regression
- k-nearest neighbours
- Naive Bayes
- Principal Component Analysis (PCA)
Answer: D. Principal Component Analysis (PCA)
Explanation
PCA projects data onto a few directions of maximum variance, reducing the number of features.
Step-by-step solution
- Principal Component Analysis finds directions with most data variation.
- It transforms data into fewer new variables.
- These variables capture most original information.
- This reduces the number of features in the dataset.
- The technique is called Principal Component Analysis (PCA).
Why the other options are wrong
- A. Logistic regression is a classifier, not a method for reducing the number of features.
- B. k-nearest neighbours is a classifier or regressor, not a dimensionality reduction method.
- C. Naive Bayes is a probabilistic classifier, not a technique for reducing dimensions.
Tip: Remember PCA for reducing features while keeping key information.
Question 3Easy
Predicting whether an email is spam or not spam is a
- regression problem
- clustering problem
- classification problem
- dimensionality reduction problem
Answer: C. classification problem
Explanation
The output is a discrete class (spam / not spam), so this is classification.
Step-by-step solution
- Spam or not spam is a category with two classes.
- Predicting a category is a classification problem.
- So the answer is classification.
Why the other options are wrong
- A. Regression predicts a continuous number, not a category.
- B. Clustering finds groups without labels; here the classes are known.
- D. Dimensionality reduction shrinks the number of features; it is not a prediction of a class.
Tip: Category output = classification; number output = regression.
Question 4Easy
Predicting the temperature of tomorrow as a real number is a
- classification problem
- regression problem
- clustering problem
- association rule problem
Answer: B. regression problem
Explanation
A continuous numeric target means regression.
Step-by-step solution
- Tomorrow's temperature is a real number, which can take any value.
- Predicting a continuous numeric value is regression.
- So the answer is regression.
Why the other options are wrong
- A. Classification predicts a category, not a real number.
- C. Clustering groups unlabelled data; it does not predict a value.
- D. Association rules find patterns in item sets, not numeric values.
Tip: Real-number output = regression.
Question 5Medium
Semi-supervised learning uses
- a small labelled set together with a large unlabelled set
- only labelled data
- only unlabelled data
- rewards from an environment
Answer: A. a small labelled set together with a large unlabelled set
Explanation
It combines a few labelled examples with many unlabelled ones, useful when labelling is expensive.
Step-by-step solution
- Semi-supervised learning uses some labelled data.
- It also uses a lot of unlabelled data.
- Labelled data is small compared to unlabelled data.
- This helps when labelling is costly or time-consuming.
- The correct answer is a small labelled set together with a large unlabelled set.
Why the other options are wrong
- B. Only labelled data is supervised learning, not semi-supervised learning.
- C. Only unlabelled data is unsupervised learning; semi-supervised uses a small labelled part too.
- D. Rewards from an environment describe reinforcement learning, not semi-supervised learning.
Tip: Use semi-supervised when labelling is expensive or hard.
Question 6Medium
If the eigenvalues of a covariance matrix are 4 and 1, the first principal component explains what fraction of total variance?
- 25%
- 40%
- 80%
- 20%
Answer: C. 80%
Explanation
Variance explained = 4/(4+1) = 0.8 = 80%.
Step-by-step solution
- Eigenvalues are 4 and 1, so total variance is 4 + 1 = 5.
- First principal component variance is 4.
- Fraction explained = 4 / 5 = 0.8 = 80%.
Why the other options are wrong
- A. 25% is not the share here; the first component's variance 4 out of total 5 gives 80%.
- B. 40% is 2 out of 5; the first eigenvalue 4 over total 5 gives 80%.
- D. 20% is the share of the second component, 1 out of 5, not the first component.
Tip: Always divide largest eigenvalue by sum of all eigenvalues for variance fraction.
Question 7Medium
Semi-supervised learning is used when
- All data is labelled
- No data exists
- Only a small portion of the data is labelled
- The reward is delayed
Answer: C. Only a small portion of the data is labelled
Explanation
It combines few labels with many unlabelled samples to improve a model.
Step-by-step solution
- Labels are costly.
- Use a few labels plus many unlabelled rows.
- Better model than labels alone.
Why the other options are wrong
- A. Then plain supervised learning applies.
- B. Learning needs data.
- D. That points to reinforcement learning.
Question 8Medium
Predicting a customer's monthly spend (a number) is a
- Regression problem
- Classification problem
- Clustering problem
- Association-rule problem
Answer: A. Regression problem
Explanation
Continuous targets use regression; categorical targets use classification.
Step-by-step solution
- Target type: continuous.
- Continuous target -> regression.
Why the other options are wrong
- B. The target is continuous, not a category.
- C. No groups are being discovered.
- D. That finds item co-occurrence.
Question 9Medium
PCA finds new axes (principal components) that
- are chosen to maximise class separation using labels
- are the original features with the largest mean
- are orthogonal and capture maximum variance in decreasing order
- are correlated with each other to preserve redundancy
Answer: C. are orthogonal and capture maximum variance in decreasing order
Explanation
Components are orthogonal eigenvectors of the covariance matrix ordered by variance explained. PCA is unsupervised, so it uses no class labels.
Step-by-step solution
- Principal components are directions in data that capture most variation.
- Each new axis is perpendicular to others (orthogonal).
- Components are ordered by how much variance they explain, from highest to lowest.
- PCA does not use class labels, so it focuses on variance alone.
- Final answer: are orthogonal and capture maximum variance in decreasing order.
Why the other options are wrong
- A. PCA ignores labels and only maximises variance; choosing axes by class separation is LDA.
- B. Principal components are new combined axes, not original features chosen by their mean.
- D. PCA makes components uncorrelated, so they are not correlated; redundancy is removed.
Tip: Remember PCA uses variance and orthogonality, not labels or redundancy.
Question 10Medium
In reinforcement learning, an agent learns mainly from
- a fully labelled dataset of correct actions
- rewards received for its actions in an environment
- grouping unlabelled data by similarity
- a fixed set of association rules
Answer: B. rewards received for its actions in an environment
Explanation
The agent interacts with an environment and adjusts its behaviour to maximise cumulative reward; no labelled input-output pairs are given.
Step-by-step solution
- In reinforcement learning, an agent acts in an environment.
- It learns from reward or penalty signals that follow its actions.
- So the answer is rewards received for its actions.
Why the other options are wrong
- A. A fully labelled dataset of correct actions describes supervised learning.
- C. Grouping unlabelled data by similarity describes clustering, an unsupervised method.
- D. A fixed set of association rules is not how an agent learns in reinforcement learning.
Tip: Reinforcement learning = trial, action, reward.
Practise all 12 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →