摘要:
#调整随机森林的参数(调整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... 阅读全文
摘要:
#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 阅读全文
摘要:
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= 阅读全文
摘要:
import matplotlib.pyplot as plt from sklearn import datasets import numpy as np from sklearn.tree import DecisionTreeClassifier n_features = 200 X, y 阅读全文