newkid
newkid

Reputation: 1468

Computing values of feature importances

Where does scikit-learn compute the values of sklearn.ensemble.RandomForestClassifier.feature_importances_?

Upvotes: 1

Views: 49

Answers (2)

Robert King
Robert King

Reputation: 994

The relevant section of the source code is here: https://github.com/scikit-learn/scikit-learn/blob/b194674c4/sklearn/ensemble/_forest.py#L415

Upvotes: 0

B--rian
B--rian

Reputation: 5880

The corresponding code should be within https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_forest.py but I do not find sklearn.ensemble.RandomForestClassifier.feature_importances there, however there is a class called RandomForestClassifier.

Upvotes: 1

Related Questions