摘要: ['sepal length (cm)', 'sepal width (cm)', 'petal length (cm)', 'petal width (cm)']The MSE is: 0.15The MSE is: 0.069[ 0.2][ 0.2 0.2 0.2 0.2 0.2 0.4 0.3 阅读全文
posted @ 2016-03-30 17:54 qqhfeng16 阅读(1027) 评论(0) 推荐(0) 编辑
摘要: KNN最邻近规则,主要应用领域是对未知事物的识别,即判断未知事物属于哪一类,判断思想是,基于欧几里得定理,判断未知事物的特征和哪一类已知事物的的特征最接近; K最近邻(k-Nearest Neighbor,KNN)分类算法,是一个理论上比较成熟的方法,也是最简单的机器学习算法之一。该方法的思路是:如 阅读全文
posted @ 2016-03-30 16:45 qqhfeng16 阅读(352) 评论(0) 推荐(0) 编辑
摘要: import matplotlib.pyplot as plt from sklearn.datasets import make_blobs import numpy as np X,labels = make_blobs(100,centers=1) from sklearn.cluster i 阅读全文
posted @ 2016-03-30 16:23 qqhfeng16 阅读(624) 评论(0) 推荐(0) 编辑
摘要: http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.normal.html #np.random.normal,产生制定分布的数集#http://docs.scipy.org/doc/numpy/reference/gen 阅读全文
posted @ 2016-03-30 11:05 qqhfeng16 阅读(4918) 评论(0) 推荐(0) 编辑
摘要: """ Demo of the histogram (hist) function with a few features. In addition to the basic histogram, this demo shows a few optional features: * Setting the number of data bins * The ``normed`... 阅读全文
posted @ 2016-03-30 10:34 qqhfeng16 阅读(1065) 评论(0) 推荐(0) 编辑
摘要: #网址 http://docs.scipy.org/doc/numpy/reference/generated/numpy.matlib.randn.html#numpy.matlib.randn numpy.matlib.randn numpy.matlib.randn(*args)[source 阅读全文
posted @ 2016-03-30 09:37 qqhfeng16 阅读(2039) 评论(0) 推荐(0) 编辑