【发布时间】:2017-05-13 08:18:00
【问题描述】:
我是 Scikit-learn 的新手。我正在与 RandomForest 合作
请问我怎样才能获得森林中每棵树的 OOB Samble?
RANDOM_STATE = 1708
clf = RandomForestClassifier(warm_start=True, oob_score=True,
max_features=None,
random_state=RANDOM_STATE)
clf.fit(KDD_data, y)
# Loop through the list of tree of the forest
for tree in clf.estimators_:
# Get sample used to build the tree
# Get the OOB sample for that tree
我想获取用于构建森林中每棵树的样本和剩余的袋装样本。
请问如何获得?
【问题讨论】:
标签: machine-learning scikit-learn classification random-forest