摘要(随机森林) - 如何阅读?

summary(randomforest) - how to read?

这是我的代码:

library(randomforest)
fit <- randomforest(var_1~.,data = mydf, ntree=100, importance =TRUE)
summary(fit)

输出结果如下:

                Length Class  Mode     
call                 5 -none- call     
type                 1 -none- character
predicted       322479 factor numeric  
err.rate           300 -none- numeric  
confusion            6 -none- numeric  
votes           644958 matrix numeric  
oob.times       322479 -none- numeric  
classes              2 -none- character
importance          24 -none- numeric  
importanceSD        18 -none- numeric  
localImportance      0 -none- NULL     
proximity            0 -none- NULL     
ntree                1 -none- numeric  
mtry                 1 -none- numeric  
forest              14 -none- list     
y               322479 factor numeric  
test                 0 -none- NULL     
inbag                0 -none- NULL     
terms                3 terms  call 

在哪里可以找到摘要的解释?

randomForest 的功能 summary 没有很好地实现/与其他模型上的总结不一致。它只是打印出一些内部变量,它们的类型和长度。内部变量的细节可以参考here

我们可以通过 print(fit) 获取一些(最少的)信息,使用 fit$forest 可以获取更多详细信息。 Leo 的原始代码是用 Fortran 编写的,当前的实现是 Andy 使用 C++。可以找到一些讨论 here.