官术网_书友最值得收藏!

Training the random forest

Training the random forest model is not very different from training the decision tree:

In []: 
from sklearn.ensemble import RandomForestClassifier 
rf_model = RandomForestClassifier(criterion = 'entropy', random_state=42) 
rf_model = rf_model.fit(X_train, y_train) 
print(rf_model) 
Out[]: 
RandomForestClassifier(bootstrap=True, class_weight=None, criterion='entropy', 
            max_depth=None, max_features='auto', max_leaf_nodes=None, 
            min_impurity_split=1e-07, min_samples_leaf=1, 
            min_samples_split=2, min_weight_fraction_leaf=0.0, 
            n_estimators=10, n_jobs=1, oob_score=False, random_state=42, 
            verbose=0, warm_start=False) 
主站蜘蛛池模板: 德江县| 咸阳市| 嘉祥县| 平安县| 平泉县| 搜索| 沙田区| 陇西县| 揭西县| 九江县| 珲春市| 江安县| 禄丰县| 玉山县| 南宫市| 萝北县| 青海省| 正安县| 饶阳县| 汝城县| 云和县| 新龙县| 静宁县| 安国市| 吉安市| 华坪县| 定安县| 泸水县| 阳曲县| 台南县| 平遥县| 舒城县| 米易县| 冕宁县| 齐河县| 渑池县| 东莞市| 永城市| 海林市| 搜索| 凌云县|