Liu, Xin
2005-Jan-06 14:01 UTC
[R] different result from the same errorest() in library( ipred)
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> 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}}
Uwe Ligges
2005-Jan-06 14:26 UTC
[R] different result from the same errorest() in library( ipred)
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.03333333Well, 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