Dear Researchers,

I am not expertise in RandomForest (RF) but I read in several paper "an
advantage to RF is given by an internal accuracy measure that makes it
unnecessary to partion reference data into separate sets for training and
validation" (using RF in classification way). I try to run RF using
Leave-One-Out cross Validation and running with all data set to predict
"airquality" and to check the difference in RMSE


the difference is:

RMSE with leave-One-Out CV = 17.04841
RMSE with all data set =  7.969656

I wish to ask if in the case I use all data there is a autocorrelation
effect using RF in regerssion way? and It's more correct to test the
performace of regerssion using Leave-One-Out cross validation?

thanks and sorry for disturb
Gianni

## Regression:

cal.rmse <- function(obs, pred) sqrt(mean((obs-pred)^2))

data(airquality)
set.seed(131)
MyOzone <- data.frame(na.omit(airquality))
str(MyOzone)


#leave-one-out/CV

my.result <- list()

for(i in 1:nrow(MyOzone)){
    My.train <- MyOzone[-i,]
    My.test <- MyOzone[i,]
    ozone.rf <- randomForest(My.train[,-c(1)],My.train[,c(1)], mtry=3,
importance=TRUE)
    my.result[[i]] <-  cbind(predict=predict(ozone.rf,My.test),observe=
My.test[,1])
}

my.result.df <- as.data.frame(do.call("rbind",my.result))
my.RMSE.1 <- cal.rmse(my.result.df$observe,my.result.df$predict)

#all data
ozone.rf <- randomForest(MyOzone[,-c(1)],MyOzone[,c(1)], mtry=3,
importance=TRUE)
my.result.df.2 <- data.frame(predict=predict(ozone.rf,MyOzone),observe=
MyOzone[,1])
my.RMSE.2 <- cal.rmse(my.result.df.2$observe,my.result.df.2$predict)


print(my.RMSE.1)
print(my.RMSE.2)

	[[alternative HTML version deleted]]

