extraTrees
extraTrees copied to clipboard
How to get leaf indices that each sample was assigned to in the forest
In Python's scikit-learn the ExtraTreesClassifier function returns a numpy array which contains the leaf indices that each sample was assigned to in the forest.
I'm trying to get similar information from extraTrees package.
I've documented the problem extensively in this StackOverflow post.
In the post I was able to get this information from the randomForest package, but due to speed/accuracy would prefer to use the extraTrees package.
Is it possible to get this information from your package and if not could it be a feature request?
It can be a feature request.
I checked the code and some modifications are needed to have that feature. Specifically, currently the trees (and leaves) are not stored in an array, so there is no indexing available. If that change is carried out adding this feature is straightforward.
Can you please add this as a feature request?