Ensemblemethoden in Python
Román de las Heras
Data Scientist, Appodeal
base_estimatorn_estimatorsoob_scoreest_bag.oob_score_max_samples: aantal samples per estimator.max_features: aantal features per estimator.bootstrap: of samples met teruglegging worden getrokken.Classificatie
from sklearn.ensemble import RandomForestClassifier
clf_rf = RandomForestClassifier(
# parameters...
)
Regressie
from sklearn.ensemble import RandomForestRegressor
reg_rf = RandomForestRegressor(
# parameters...
)
Bagging-parameters:
n_estimatorsmax_featuresoob_scoreBoomspecifieke parameters:
max_depthmin_samples_splitmin_samples_leafclass_weight ("balanced")
Ensemblemethoden in Python