Displaying 3 results from an estimated 3 matches for "traindat".
Did you mean:
traindata
2009 Dec 10
2
different randomForest performance for same data
...datasets on the one hand and after assigning the levels of the training dataset on the testdataset. I only assign the levels and do not change the dataset itself however the models perform different.
Why???
Here is my code:
> library(randomForest)
> load("datasets.RData") # import traindat and testdat
> nlevels(traindat$predictor1)
[1] 20
> nlevels(testdat$predictor1)
[1] 19
> nrow(traindat)
[1] 9838
> nrow(testdat)
[1] 3841
> set.seed(10)
> rf_orig <- randomForest(x=traindat[,-1], y=traindat[,1], xtest=testdat[,-1], ytest=testdat[,1],ntree=100)
> data.frame(r...
2009 Jan 22
4
dimnames in pkg "ipred"
Hello List,
I`m trying to make prediction using a bagged tree with the package ipred. I tried to follow the manual but I`m getting an error message. Also browsing through the list-archive I didn`t find any hint.
Maybe someone can help me?
selbag <- bagging(SOIL_UNIT ~., data=traindat.bin, coob=TRUE)
Error in dimnames(X) <- list(dn[[1L]], unlist(collabs, use.names = FALSE)) :
length of 'dimnames' [2] not equal to array extent
I´m using R 2.7.2 on Win XP and the latest version of ipred.
Thanks a lot.
TIM
-----------------------------------------------...
2002 Nov 26
0
degenerate cases in RPART
RPART doesn't seem to handle the degenerate case when all training
samples are drawn from a single class:
> TrainType
[1] 0 0 0 0
> TrainDat
V1 V2 V3 V4 V5
1 0.6434392 0.5105860 0.3048803 0.3161728 0.5449632
2 0.1710005 0.5973921 0.1267061 0.6146834 0.7299928
3 0.6919125 0.8880789 0.9123243 0.9061885 0.9553663
4 0.3094843 0.6475508 0.7403838 0.6824748 0.8488170
> x <- rpart(as.facto...