Question 8

Last Updated :
Discuss
Comments

The getPredictions function returns predictions for the test set. How does it determine the predicted class for each instance?

By calculating Euclidean distance to the nearest neighbor

By finding the class with the highest posterior probability using Gaussian likelihoods

By averaging all feature values and comparing with thresholds

By randomly assigning a class based on prior probabilities

Share your thoughts in the comments