【用Python玩Machine Learning】KNN * 测试
来源:互联网 发布:gentoo linux 乱码 编辑:程序博客网 时间:2024/06/09 14:50
样本我就用的《machine learning in action》中提供的数据样例,据说是婚恋网站上各个候选人的特征,以及当前人对这些人的喜欢程度。一共1k条数据,前900条作为训练样本,后100条作为测试样本。
数据格式如下:
468933.5629760.445386didntLike81783.2304821.331698smallDoses557833.6125481.551911didntLike11480.0000000.332365smallDoses100623.9312990.487577smallDoses7412414.7523421.155160didntLike6660310.2618871.628085didntLike118932.7872661.570402smallDoses5090815.1123191.324132largeDoses398915.1845530.223382largeDoses659153.8683590.128078didntLike656783.5079650.028904didntLike
最后的测试结果,100个测试样本有11个样本分类错误,错误率最终是11%。
补充一下,代码+数据保存在github上面:https://github.com/henryxiao1997/machine-learning-in-python/tree/master/KNN
如有转载,请注明出处:http://blog.csdn.net/xceman1997/article/details/44994327
0 0
- 【用Python玩Machine Learning】KNN * 测试
- 【用Python玩Machine Learning】KNN * 序
- 【用Python玩Machine Learning】KNN * 代码 * 一
- 【用Python玩Machine Learning】KNN * 代码 * 二
- Machine Learning In Action:KNN(Python)
- 【machine learning】KNN算法
- Pythonic machine learning:KNN
- <machine learning traning> KNN
- Machine Learning---1--KNN
- Machine Learning In Action -- kNN的python实现
- MACHINE LEARNING IN ACTION KNN
- Machine learning in action ch02 KNN笔记
- 【Machine Learning in Action】Chap1|Classification|kNN
- Machine Learning 笔记之KNN算法
- Machine Learning (Python)
- python for machine-learning
- Python Machine Learning
- Python Machine Learning : Chap2
- HttpClientUtil工具类
- linux文件设备与I/O:read/write函数 与 阻塞 Block
- va_list
- fc14 源
- Hadoop学习笔记0003——从Hadoop URL读取数据
- 【用Python玩Machine Learning】KNN * 测试
- 基于mysqldump快速搭建从库
- servlet服务器与预览器解码编码问题。
- P67 3
- checkbox 设置为选中和未选中状态
- 配置ODBC连接SQL SERVER2012
- Images xcassets介绍
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- Windows平台搭建Android分析环境