PhilippPro / tuneRanger

Automatic tuning of random forests
32 stars 9 forks source link

3 questions about the behavior of tuneRanger #11

Closed andreoulios closed 1 year ago

andreoulios commented 1 year ago

Hello and thank you for this simple and fast package.

I have 3 questions regarding tuning process.

  1. Why when tuning with parameters arguments to be passed to ranger(), importance = "permutation", and/or splitrule="extratrees", mtry is being tuned to a large value close to the number of predictors? I observe the same behavior with caret, so is this theory based? Also sample.fraction is tuned close to 0.9.

  2. Why cant other arguments be passed to parameters like min.bucket?

  3. Why importance included in returned fitted model, object$model, cannot be accesed by ranger::importance or varImp function of caret? I get this error:

no applicable method for 'importance' applied to an object of class "c('double', 'numeric')"

If i am not making a user error, that would be nice if implemented.

Thank you in advance.

PhilippPro commented 1 year ago
  1. I do not know nothing about this behaviour and I am not an expert in case of "extratrees". You should ask an expert in this area and proof your statement by some simulations.

  2. "min.bucket" is currently not a parameter in "ranger". What parameter do you mean?

  3. As the calculation of variable importance takes quite a long time, I would not do it in the tuning process. I would tune first with tuneRanger and then apply the parameters in ranger and calculate the variable importance, so they have to be calculated only once.