"Play machine learning with Python" KNN * Test

Source: Internet
Author: User

Sample of the data provided in the machine learning in action, which is said to be the characteristics of each candidate on a dating site, and how much the current person likes them. A total of 1k data, the first 900 as a training sample, the last 100 as a test sample.

The data format is as follows:

468933.5629760.445386didntlike81783.2304821.331698smalldoses557833.6125481.551911didntlike11480.0000000.332365smalldoses1 00623.9312990.487577smalldoses7412414.7523421.155160didntlike6660310.2618871.628085didntlike118932.7872661.570402smalldos Es5090815.1123191.324132largedoses398915.1845530.223382largedoses659153.8683590.128078didntlike656783.5079650.028904didnt Like

The final test results, 100 test samples have 11 sample classification errors, the error rate is finally 11%.

"Play machine learning with Python" KNN * Test

Related Article

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.