Python में Ensemble Methods
Román de las Heras
Data Scientist, Appodeal
base_estimatorn_estimatorsoob_scoreest_bag.oob_score_max_samples: हर estimator के लिए चुने जाने वाले samples की संख्या.max_features: हर estimator के लिए चुने जाने वाले features की संख्या.bootstrap: samples को replacement के साथ चुनना है या नहीं.Classification
from sklearn.ensemble import RandomForestClassifier
clf_rf = RandomForestClassifier(
# parameters...
)
Regression
from sklearn.ensemble import RandomForestRegressor
reg_rf = RandomForestRegressor(
# parameters...
)
Bagging पैरामीटर:
n_estimatorsmax_featuresoob_scoreट्री-विशिष्ट पैरामीटर:
max_depthmin_samples_splitmin_samples_leafclass_weight ("balanced")
Python में Ensemble Methods