2017-03-07 62 views
2

这里是我的代码:总结(randomforest) - 如何阅读?

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 

我在哪里可以找到汇总的解释呢?

+0

我想你是指随机森林。 –

回答

2

功能summary对于randomForest确实执行得很好/与其他模型上的总结不一致。它只是打印出一些内部变量,它们的类型和长度。可以找到内部变量的详细信息here

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

+0

非常感谢。在Leo Breiman的页面上,我似乎无法找到“呼叫”(摘要的第一行)。你的意思是说'没有很好地执行'? – user1700890

+1

@ user1700890是的。我的意思是RF的摘要不如其他型号的摘要。或者它不符合“R”标准“ – hxd1011