上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 78 下一页
摘要: #调整随机森林的参数(调整max_features,结果未见明显差异) from sklearn import datasets X, y = datasets.make_classification(n_samples=10000,n_features=20,n_informative=15,flip_y=.5, weights=[.2, .8]) import numpy as np t... 阅读全文
posted @ 2016-03-31 18:10 qqhfeng16 阅读(7205) 评论(0) 推荐(0) 编辑
摘要: #In the next recipe, we'll look at how to tune the random forest classifier. #Let's start by importing datasets: from sklearn import datasets X, y = d 阅读全文
posted @ 2016-03-31 17:06 qqhfeng16 阅读(28305) 评论(0) 推荐(0) 编辑
摘要: pip类似RedHat里面的yum,安装Python包非常方便。本节详细介绍pip的安装、以及使用方法。 1、pip下载安装 1.1 pip下载 1 # wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5= 阅读全文
posted @ 2016-03-31 11:33 qqhfeng16 阅读(445) 评论(0) 推荐(0) 编辑
摘要: import matplotlib.pyplot as plt from sklearn import datasets import numpy as np from sklearn.tree import DecisionTreeClassifier n_features = 200 X, y 阅读全文
posted @ 2016-03-31 11:09 qqhfeng16 阅读(1847) 评论(0) 推荐(0) 编辑
摘要: ['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) 编辑
上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 78 下一页