Ensemble Methods in Python
Román de las Heras
Data Scientist, Appodeal
base_estimatorn_estimatorsoob_scoreest_bag.oob_score_max_samples: počet vzorků pro každý estimátor.max_features: počet příznaků pro každý estimátor.bootstrap: zda se vzorky vybírají s opakováním.Klasifikace
from sklearn.ensemble import RandomForestClassifier
clf_rf = RandomForestClassifier(
# parameters...
)
Regrese
from sklearn.ensemble import RandomForestRegressor
reg_rf = RandomForestRegressor(
# parameters...
)
Parametry baggingu:
n_estimatorsmax_featuresoob_scoreParametry stromů:
max_depthmin_samples_splitmin_samples_leafclass_weight ("balanced")
Ensemble Methods in Python