Caret ranger "always.split.variables"

caret

#1

Hi,

In the Random Forest implementation of ranger I see that a user is able to force the algorithm to always split on specific variables using the argument always.split.variables.

Is It possible to set this argument in caret somehow. I have a model where I examined the misclassifications and I can see that several attributes have ideal values which should insure the algorithm classifies a record as yes but instead it gets classified as a no. I would like the force the algorithm to split on these columns more if possible to see if it results in an improved fit.

Thank you for your time


#2

If you pass an argument to train that is not one of its arguments, it gets passed to the underlying model function (ranger, in this case). You could use something like

train(Species ~ ., data = iris, method = "ranger", always.split.variables = "Sepal.Width")

#3

Thanks @Max, using this i was able to make my model a little bit more sensitive to the class i was trying to predict