尝试一些用KNN来做数字识别,测试数据来自:MNIST handwritten digit database, Yann LeCun, Corinna Cortes and Chris Burgeshttp://yann.lecun.com/exdb/mnist/ 1.数据将位图转为向量(数组),k尝试取值3-15,距离计算采用欧式距离.d(x,y)=\sqrt{\sum_{i=1}^{n}(x_i-y_i)^2} 2.测试调整k的取值和基础样本数量,测试得出k取值对识别正确率的影响,以及分类识…
K最近邻(k-Nearest Neighbour,KNN)分类算法,是最简单的机器学习算法之一.由于KNN方法主要靠周围有限的邻近的样本,而不是靠判别类域的方法来确定所属类别的,因此对于类域的交叉或重叠较多的待分样本集来说,KNN方法较其他方法更为适合.该算法的功能有:从目标区域抽样计算欧式或马氏距离:在交叉验证后的RMSE基础上选择启发式最优的K邻域:计算多元k-最近邻居的距离倒数加权平均. 机器学习(一)--K-近邻(KNN)算法 - oYabea - 博客园http://www.cnblo…
gosuri/uiprogress: A go library to render progress bars in terminal applicationshttps://github.com/gosuri/uiprogress 依赖go-isatty,用于判断程序是在什么终端运行https://github.com/mattn/go-isatty 依赖uilive,提供一个定时刷新的命令行输出https://github.com/gosuri/uilive uiprogress.Start…
# flowcontrol    - for        - for i := 0; i < 10; i++ {        - for ; sum < 1000; {        - For is Go's "while" - for sum < 1000 {        - Forever - for {    - if        - if x < 0 {        - } else {        - if v := math.Pow(x…
Redis数据类型之LIST类型 - Web程序猿 - 博客频道 - CSDN.NEThttp://blog.csdn.net/thinkercode/article/details/46565051 Redis的list是一个双向链表,应用场景很多,比如微博的关注列表,粉丝列表等都可以用Redis的list结构来实现:博客实现中,可为每篇日志设置一个list,在该list中推入进博客评论:也可以使用Redis list实现消息队列. # list命令- LPUSH/RPUSH    - LPU…
理解RESTful架构 - 阮一峰的网络日志http://www.ruanyifeng.com/blog/2011/09/restful.html RESTful API 设计指南 - 阮一峰的网络日志http://www.ruanyifeng.com/blog/2014/05/restful_api.html RESTful API 设计最佳实践-CSDN.NEThttp://www.csdn.net/article/2013-06-13/2815744-RESTful-API Microso…
信息论的熵 - guisu,程序人生. 逆水行舟,不进则退. - 博客频道 - CSDN.NEThttp://blog.csdn.net/hguisu/article/details/27305435 熵(entropy)的计算公式如下:H_x=-\sum_{i=1}^{n}p(x_i)\log_{2}{p(x_i)} <机器学习实战>基于信息论的三种决策树算法(ID3,C4.5,CART) - Thinkgamer博客 - 博客频道 - CSDN.NEThttp://blog.csdn.ne…
Zookeeper是hadoop的一个子项目,提供分布式应用程序协调服务. Apache ZooKeeper - Homehttps://zookeeper.apache.org/ zookeeper原理(转) - 翻过这座山,就到菩提洞了 - ITeye技术网站http://cailin.iteye.com/blog/2014486/ zookeeper场景 - 翻过这座山,就到菩提洞了 - ITeye技术网站(ZooKeeper典型应用场景一览)http://cailin.iteye.com…
record_t包含_sum._count._time_stamp._max._min最基础的一条记录,可以用来记录最大值.最小值.计数.总和metric_t含有RECORD_NUM(6)份record_t,当metric_t::add调用时更新record_t的内容 metric_t包含_name._records[6]._sample_vals[500]._threshold_rate._cursor._operation._cur_time_stampmonitor_data_t含有MET…
daviddengcn/go-colortext: Change the color of console text.https://github.com/daviddengcn/go-colortext dixonwille/wlog: A simple logging interface that supports cross-platform color and concurrency.https://github.com/dixonwille/wlog package main impo…