摘要:
from sklearn import datasets import numpy as np X, y = datasets.make_blobs(n_features=2, centers=2) from sklearn.svm import LinearSVC from sklearn.svm 阅读全文
摘要:
http://docs.scipy.org/doc/numpy/reference/generated/numpy.percentile.html numpy.percentile(a, q, axis=None, out=None, overwrite_input=False, interpola 阅读全文
摘要:
#调整随机森林的参数(调整n_estimators随机森林中树的数量默认10个树,精度递增显著) 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 ... 阅读全文
摘要:
阅读全文
摘要:
#调整随机森林的参数(调整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 阅读全文