Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Machine Learning by (55.6k points)
Can anyone explain KNN in Machine learning?

2 Answers

0 votes
by (119k 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:

0 votes
by (19.9k points)

KNN stands for a k-nearest neighbor. It is an unsupervised learning algorithm that tries to separate our data into k distinct groups based on their distance from each other in a scatter plot. It is usually used in statistical estimation, pattern recognition, etc.

If you are looking for an online course to learn Machine Learning, I recommend this Machine Learning Course by Intellipaat.

Related questions

Browse Categories

...