[R] different result from the same errorest() in library( ipred)

Uwe Ligges ligges at statistik.uni-dortmund.de
Thu Jan 6 15:26:10 CET 2005


Liu, Xin wrote:

> Dear all,
> 
> Does anybody can explain this: different results got when all the same parameters are used in the errorest() in library ipred, as the following?
> 
> errorest(Species ~ ., data=iris, model=randomForest, estimator = "cv", est.para=control.errorest(k=3),  mtry=2)$err 
> [1] 0.03333333

Well, why do you expect to get the same results when you don't set the seed?

Both randomForest and the 3-fold cross validation make use of random 
numbers!

Uwe Ligges



>>errorest(Species ~ ., data=iris, model=randomForest, estimator = "cv", est.para=control.errorest(k=3),  mtry=2)$err 
> 
> [1] 0.04
> 
>>errorest(Species ~ ., data=iris, model=randomForest, estimator = "cv", est.para=control.errorest(k=3),  mtry=2)$err 
> 
> [1] 0.05333333
> 
>>errorest(Species ~ ., data=iris, model=randomForest, estimator = "cv", est.para=control.errorest(k=3),  mtry=2)$err 
> 
> [1] 0.05333333
> 
>>errorest(Species ~ ., data=iris, model=randomForest, estimator = "cv", est.para=control.errorest(k=3),  mtry=2)$err 
> 
> [1] 0.04666667
> 
>>errorest(Species ~ ., data=iris, model=randomForest, estimator = "cv", est.para=control.errorest(k=3),  mtry=2)$err 
> 
> [1] 0.05333333
> 
>>errorest(Species ~ ., data=iris, model=randomForest, estimator = "cv", est.para=control.errorest(k=3),  mtry=2)$err 
> 
> [1] 0.04
> 
> 
> Xin LIU
> 
> This e-mail is from ArraDx Ltd
> 
> The e-mail and any files transmitted with it are confidentia...{{dropped}}
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list