在sklearn中实现的随机林中有apply(X)
函数-GBRT有等价的吗?你知道吗
编辑时间:
for estimator in gbrt.estimators_:
estimator.tree_.apply(X)
提供:
File "<pyshell#29>", line 2, in <module>
estimator.tree_.apply(Z)
AttributeError: 'numpy.ndarray' object has no attribute 'tree_'
Tags:
您可以使用每个
apply
的estimator.tree_
方法:如果要进行多类分类,则每个阶段的每个类将有一棵树,因此需要执行以下操作:
相关问题 更多 >
编程相关推荐