一、安装sklearn
conda install scikit-learn
参考文献
[1]整体介绍sklearn
https://blog.csdn.net/u014248127/article/details/78885180
二、介绍RandomForestRegressor
1 sklearn.ensemble.RandomForestRegressor( n_estimators=10,2 criterion='mse',3 max_depth=None,4 min_samples_split=2,5 min_samples_leaf=1,6 min_weight_fraction_leaf=0.0,7 max_features='auto',8 max_leaf_nodes=None,9 min_impurity_split=1e-07,10 bootstrap=True,11 oob_score=False,12 n_jobs=1,13 random_state=None,14 verbose=0,15 warm_start=False)
criterion: ”gini” or “entropy”(default=”gini”)是计算属性的gini(基尼不纯度)还是entropy(信息增益),来选择最合适的节点。
splitter: ”best” or “random”(default=”best”)随机选择属性还是选择不纯度最大的属性,建议用默认。
max_features: 选择最适属性时划分的特征不能超过此值。
当为整数时,即最大特征数;
if “auto”, then max_features=sqrt(n_features). 简单地选取所有特征