Common problems in K-nearest neighbor algorithm

Source: Internet
Author: User
  1. The first question is the choice of K-value?

  2. How to quickly find a K-neighbor, especially if the feature space dimension is large and the training data capacity is large.



(1) K-value problem: When the K value is very small, it is equivalent to a small field of training examples to predict, the approximate error of learning will be reduced, only the training instance closer to the input instance will work on the predicted results (in turn, the closer you are, the more similar, the farther away, the similarity is very poor). But the disadvantage is that the estimation error of learning will increase, the prediction results will be very sensitive to the neighbor's instance point, if the neighbor's instance point happens to be noise, the prediction will be wrong. (Noisy, more complex), the more complex the model, the more prone to the occurrence of fit

If the selection is large, it is equivalent to using the training examples in the larger field to predict. The advantage is that it can reduce the estimated error of learning

The larger the K, the more training instance that is farther from the input instance (which can reduce noise) means that the overall model changes Be simple


In general, the K value is obtained through the intersection verification method. Generally takes k value less than sqrt (n)

(2) How to quickly search for K neighbors?

KD trees are a good way to

This article from "Jane Answers Life" blog, declined reprint!

Common problems in K-nearest neighbor algorithm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.