DSP YEAR 2 CHALLENGE TEST
CERTIFICATION EVALUATION EXAMS
COMPLETE SOLUTION
◉ What is k-NN? Answer: k-NN is a supervised machine learning
algorithm used for classification and regression that makes
predictions based on the nearest data points.
◉ Is k-NN supervised or unsupervised, and why? Answer: k-NN is
supervised because the training data already contains correct labels or
values.
◉ What does k represent in k-NN? Answer: k represents the number
of nearest neighbours used to make a prediction.
◉ How does k-NN work for classification? Answer: k-NN predicts
the class by majority voting among the nearest neighbours.
◉ How does k-NN work for regression? Answer: k-NN predicts a
numerical value by averaging the values of the nearest neighbours.
◉ What happens when k is too small? Answer: The model becomes
sensitive to noise, causing high variance and overfitting.
, ◉ What happens when k is too large? Answer: The model has high
bias and may miss local patterns.
◉ What is a distance metric? Answer: A distance metric measures
how close or similar two data points are.
◉ Why does k-NN need a distance metric? Answer: To identify the
nearest neighbours for prediction.
◉ Name common distance metrics used in k-NN. Answer: Euclidean
distance and Manhattan distance.
◉ What is feature scaling? Answer: Adjusting features to the same
numerical range.
◉ Why is feature scaling important for k-NN? Answer: Because
distance calculations are affected by feature magnitude.
◉ What happens if features are not scaled in k-NN? Answer: Large-
scale features dominate distances and cause incorrect predictions.
◉ List the advantages of k-NN. Answer: Simple, easy to understand,
no training phase, interpretable.
CERTIFICATION EVALUATION EXAMS
COMPLETE SOLUTION
◉ What is k-NN? Answer: k-NN is a supervised machine learning
algorithm used for classification and regression that makes
predictions based on the nearest data points.
◉ Is k-NN supervised or unsupervised, and why? Answer: k-NN is
supervised because the training data already contains correct labels or
values.
◉ What does k represent in k-NN? Answer: k represents the number
of nearest neighbours used to make a prediction.
◉ How does k-NN work for classification? Answer: k-NN predicts
the class by majority voting among the nearest neighbours.
◉ How does k-NN work for regression? Answer: k-NN predicts a
numerical value by averaging the values of the nearest neighbours.
◉ What happens when k is too small? Answer: The model becomes
sensitive to noise, causing high variance and overfitting.
, ◉ What happens when k is too large? Answer: The model has high
bias and may miss local patterns.
◉ What is a distance metric? Answer: A distance metric measures
how close or similar two data points are.
◉ Why does k-NN need a distance metric? Answer: To identify the
nearest neighbours for prediction.
◉ Name common distance metrics used in k-NN. Answer: Euclidean
distance and Manhattan distance.
◉ What is feature scaling? Answer: Adjusting features to the same
numerical range.
◉ Why is feature scaling important for k-NN? Answer: Because
distance calculations are affected by feature magnitude.
◉ What happens if features are not scaled in k-NN? Answer: Large-
scale features dominate distances and cause incorrect predictions.
◉ List the advantages of k-NN. Answer: Simple, easy to understand,
no training phase, interpretable.