imbs-hl / ranger

A Fast Implementation of Random Forests
http://imbs-hl.github.io/ranger/
772 stars 193 forks source link

num.random.splits depending each variable #385

Open BlindApe opened 5 years ago

BlindApe commented 5 years ago

I would like to use different number of num.random.splits for each predictor. Could you please give a guideline of which part of code would be necessary tune?

Thanks

mnwright commented 5 years ago

You could change num_random_splits to a std::vector<uint> in Forest.h https://github.com/imbs-hl/ranger/blob/82b7b240ccd7ca90d88b1b3d2c31c95d2f25f916/src/Forest.h#L201 and Tree.h https://github.com/imbs-hl/ranger/blob/82b7b240ccd7ca90d88b1b3d2c31c95d2f25f916/src/Tree.h#L177 You'll have to check all occurrences of these two and also change the R wrapper.

I like the idea and if it's not super urgent I can do the change myself when I find the time.