sveer
sveer

Reputation: 472

RandomForestClassifiers sklearn apply(X)

Apply returns indices of leafs.

Could anyone explain which indices does it return? Related fucntion in Matlab?

Thanks

Upvotes: 0

Views: 34

Answers (2)

Davide Nardone
Davide Nardone

Reputation: 95

Based on the lecture found here, these indices must represent the Decision Regions of membership for each x sample belonging to X.

Upvotes: 1

Ub2r
Ub2r

Reputation: 31

It gives you the indices of the leaf your data point is for every tree of your forest. This is what is then used to predict the class of your point.

Upvotes: 2

Related Questions