3. K-Nearest Neighbor algorithm

Source: Internet
Author: User

K Nearest neighbor (k-nearest NEIGHBOR,KNN) Classification algorithm

1, definition: If a sample in the feature space in the k nearest (that is, the closest feature space) of the sample most belong to a category, then the sample belongs to this category.

2, calculation formula:;

3, K-Nearest neighbor algorithm needs to do standardized processing;

4. K-Nearest Neighbor algorithm API

5. Advantages:

1) simple, no parameter handling, no training required

6. Disadvantages:

1) lazy algorithm, when the test sample classification of large computational capacity, memory overhead;

2) must be specified k value, K value is not properly selected classification accuracy is not guaranteed;

7, the use of the scene: small data volume, thousands of ~ Tens of thousands of samples.

8, speed up the search speed-based on improved algorithm kdtree.

3. 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.