We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 527ecf5 commit b7d9c3eCopy full SHA for b7d9c3e
sklearn/ensemble/forest.py
@@ -335,7 +335,8 @@ def feature_importances_(self):
335
all_importances = Parallel(n_jobs=self.n_jobs, backend="threading")(
336
delayed(getattr)(tree, 'feature_importances_')
337
for tree in self.estimators_)
338
- return sum(all_importances) / self.n_estimators
+
339
+ return sum(all_importances) / len(self.estimators_)
340
341
342
class ForestClassifier(six.with_metaclass(ABCMeta, BaseForest,
0 commit comments