grf-labs / grf

Generalized Random Forests
https://grf-labs.github.io/grf/
GNU General Public License v3.0
938 stars 250 forks source link

Consider an OptimizedPredictionStrategy for survival forest #1419

Open erikcs opened 3 weeks ago

erikcs commented 3 weeks ago

See #1350 for a quick overview. The idea would be to use OptimizedPredictionStrategy if num.failures is below some threshold, say 150.

Another potential alternative could be to modify DefaultPredicitonStrategy's weight container. As pointed out in #483 std::unordered_map have some drawbacks. For predictions these drawbacks are data dependent, for some weight functions, a sparse hash table (https://github.com/erikcs/grf/commits/NewHash/) can be faster. The idea would be to find some optimal threshold to decide when to use the stl hash table and when to use a sparse hash table, then automate that choice in a new container.