0 votes
1 view
in Machine Learning by (23.4k points)
Can anyone explain KNN in Machine learning?

1 Answer

0 votes
by (45.6k points)

In Machine learning, KNN (K-nearest neighbors) is a type of supervised learning algorithm that can be used for both classification and regression tasks. For KNN, we need to initialize the hyperparameter K. Later algorithm will calculate the distance between all the observations of the training dataset with the current observation in the test dataset. Then the algorithm picks the observations with the highest K distances. If it is a regression task, the algorithm returns the mean of K classes. If it is a classification task, the algorithm returns the mode of K classes.

You can enroll in this Machine learning online course by Intellipaat to learn Machine learning.

You can watch this video on Machine learning Full course to learn and implement KNN:

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...