在操作ranForest
后,我有一份标的
> RF
Call:
randomForest(x = iris[-5], iris[5], ntree = 50, sampsize = c(100), importance = TRUE, do.trace = F, forest = TRUE)
Type of random forest: regression
Number of trees: 50
No. of variables tried at each split: 2
Mean of squared residuals: 0.03852423
% Var explained: 13.13
My question is how would I just print the last line (% Var explained: 13.13)?
I know for some functions there is a call like hist$breaks
that will give a specific part of the object. I can t find anything similar for this object. Any suggestions?