Supervised vs Unsupervised Questions with Answers

12 practice questions on Supervised vs Unsupervised (Machine Learning) with answers and step-by-step solutions. Try 10 samples below, then practise all 12 free in the AptiNest app.

Sample questions

Question 1Easy

Which of the following is an unsupervised learning method?

  1. Linear regression
  2. Logistic regression
  3. Decision tree classifier
  4. 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

  1. Unsupervised learning finds structure in data that has no labels.
  2. k-means groups unlabelled points into k clusters.
  3. 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?

  1. Logistic regression
  2. k-nearest neighbours
  3. Naive Bayes
  4. 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

  1. Principal Component Analysis finds directions with most data variation.
  2. It transforms data into fewer new variables.
  3. These variables capture most original information.
  4. This reduces the number of features in the dataset.
  5. 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

  1. regression problem
  2. clustering problem
  3. classification problem
  4. 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

  1. Spam or not spam is a category with two classes.
  2. Predicting a category is a classification problem.
  3. 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

  1. classification problem
  2. regression problem
  3. clustering problem
  4. association rule problem

Answer: B. regression problem

Explanation

A continuous numeric target means regression.

Step-by-step solution

  1. Tomorrow's temperature is a real number, which can take any value.
  2. Predicting a continuous numeric value is regression.
  3. 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

  1. a small labelled set together with a large unlabelled set
  2. only labelled data
  3. only unlabelled data
  4. 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

  1. Semi-supervised learning uses some labelled data.
  2. It also uses a lot of unlabelled data.
  3. Labelled data is small compared to unlabelled data.
  4. This helps when labelling is costly or time-consuming.
  5. 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?

  1. 25%
  2. 40%
  3. 80%
  4. 20%

Answer: C. 80%

Explanation

Variance explained = 4/(4+1) = 0.8 = 80%.

Step-by-step solution

  1. Eigenvalues are 4 and 1, so total variance is 4 + 1 = 5.
  2. First principal component variance is 4.
  3. 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

  1. All data is labelled
  2. No data exists
  3. Only a small portion of the data is labelled
  4. 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

  1. Labels are costly.
  2. Use a few labels plus many unlabelled rows.
  3. 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

  1. Regression problem
  2. Classification problem
  3. Clustering problem
  4. Association-rule problem

Answer: A. Regression problem

Explanation

Continuous targets use regression; categorical targets use classification.

Step-by-step solution

  1. Target type: continuous.
  2. 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

  1. are chosen to maximise class separation using labels
  2. are the original features with the largest mean
  3. are orthogonal and capture maximum variance in decreasing order
  4. 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

  1. Principal components are directions in data that capture most variation.
  2. Each new axis is perpendicular to others (orthogonal).
  3. Components are ordered by how much variance they explain, from highest to lowest.
  4. PCA does not use class labels, so it focuses on variance alone.
  5. 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

  1. a fully labelled dataset of correct actions
  2. rewards received for its actions in an environment
  3. grouping unlabelled data by similarity
  4. 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

  1. In reinforcement learning, an agent acts in an environment.
  2. It learns from reward or penalty signals that follow its actions.
  3. 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 →

Related topics

See all Machine Learning topics · All topics