摘要(randomforest) - 如何阅读?

时间:2017-03-07 17:46:01

标签: r random-forest

这是我的代码:

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 

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

1 个答案:

答案 0 :(得分:2)

summary的{​​{1}}函数未能很好地实现/与其他模型的摘要不一致。它只是打印出一些内部变量,它们的类型和长度。可以找到内部变量的详细信息here

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

相关问题