Hi list,

I´m working on a predictive modeling task using the caret package.
I found the best model parameters using the train() and trainControl() command. Now I want to evaluate my model and make predictions on a test dataset. I tried to follow the instructions in the manual and the vignettes but unfortunately I´m getting an error message I can`t figure out.
Here is my code:
rfControl <- trainControl(method = "oob", returnResamp = "all", returnData=TRUE, verboseIter = TRUE)
rftrain <- train(x=train_x, y=trainclass, method="rf", tuneGrid=tuneGrid, tr.control=rfControl)

pred <- predict(rftrain) 
pred	# this works fine
expred <- extractPrediction(rftrain)

Error in models[[1]]$trainingData : 
  $ operator is invalid for atomic vectors

My predictors are 28 numeric attributes and one factor.
I`m working with the latest version of caret and R 2.7.2 on WinXP.

Any advice is very welcome.

Thanks.
TIM


------------------------------------------------------------------------------- 
Dipl.-Geogr. Tim Häring
Sachgebiet Standort und Bodenschutz (SG 2.1)
Bayerische Landesanstalt für Wald und Forstwirtschaft
Am Hochanger 11
D-85354 Freising

Tel.: +49-(0)8161/71-4769
E-Mail: tim.haering@lwf.bayern.de
http://www.lwf.bayern.de




	[[alternative HTML version deleted]]


