pynndescent icon indicating copy to clipboard operation
pynndescent copied to clipboard

Leaf indices

Open lambdaofgod opened this issue 6 years ago • 1 comments

I don't see support for returning leaf indices for an object, like with XGBoost's pred_leaf option. In principle this should be possible since your search algorithm does that implicitly (right?)

How should I start implementing this functionality? Do you think it makes sense to have pred_leaf argument in PyNNDescentTransformer for example?

lambdaofgod avatar Oct 02 '19 15:10 lambdaofgod

I believe it should be possible, but I think the data structures are likely currently backwards for what you want to do -- instead of each datapoint knowing which leaf it is in, each leaf knows the datapoints that are in it. I'm not sure the leaves themselves are that meaningful for a random prejection tree as well -- although I would be happy to see any pull requests you want to make; I suspect I am not quite understandsing what you are wanting to do exactly.

lmcinnes avatar Oct 02 '19 16:10 lmcinnes