square / pysurvival

Open source package for Survival Analysis modeling
https://www.pysurvival.io/
Apache License 2.0
350 stars 106 forks source link

Add method "apply(self, X)" to forest-based survival models #22

Open gdmarmerola opened 4 years ago

gdmarmerola commented 4 years ago

In the sklearn API for tree-based models there's an method "apply(self, X)" that returns leaf indices, applying trees in the forest to X. It is very useful to diagnose which elements ended up in the same leaf node and cluster them.

Is it possible to add this functionality?