Different results using random forest forecasting in R

When I run an arbitrary forest model from my test data, I get different results for the same model + data model.

Here are the results where you can see the difference in the first column:

> table((predict(rfModelsL[[1]],newdata = a)) ,a$earlyR)

        FALSE TRUE
 FALSE    14    7
 TRUE     13   66

> table((predict(rfModelsL[[1]],newdata = a)) ,a$earlyR)

        FALSE TRUE
 FALSE    15    7
 TRUE     12   66

Although the difference is very small, I am trying to understand what caused this. I assume that it predicthas a β€œflexible” classification threshold, although I could not find it in the documentation; I'm right?

Thank you in advance

+4
source share
1 answer

I assume that you have not updated the model here, but it is just a challenge predictthat produces these results. The answer is probably this: from ?predict.randomForest:

, , , ntree randomForest()

+5

Source: https://habr.com/ru/post/1667645/


All Articles