# Speed up Conditional Variable Importance for Random Forests

I have trained a random forest in R and now I'm calculating the variable importance mesaure unsing the party Package.

importance <- varimp(randomForest, conditional = TRUE)


My data set consists of 30000 observations with 40 continuous variables and 10 categorical variables. The problem is that variables are correlated, wherfore I have to use the conditional variable importance measure (see this paper).

Training the random forest with 100 trees took ~10 minutes, but calculation of variable importance already takes two days.

How can calculating variable importance be speeded up? Or can it be claculated how long the calculation will take?

• That's just a feaure, there is no way to speed it up, except using a different package which does not use conditional inference. – user2974951 Jan 15 at 14:24
• I have colleague that worked with conditional importance and the main complaint was that it is incredible computationally intensive.You could sample your data but, there really is no easy solution. – J_Heads Jan 15 at 14:28
• Thanks @J_Heads Are there any information regarding time complexity of the conditional importance algorithm? Then I could get an idea what causes this long computation time. If it depends on the number of observations, sampling might be an idea. – Hans Meier Ruth Jan 15 at 14:52
• bmcbioinformatics.biomedcentral.com/articles/10.1186/… – J_Heads Jan 15 at 14:55