I use an example from this question
train$`1stFlrSF`<-train$S1stFlrSF
train$`2ndFlrSF`<-train$S2ndFlrSF
train$`3SsnPorch`<-train$S3SsnPorch
library("randomForest")
set.seed(1)
rf.model <- randomForest(SalePrice ~ .,
data = train,
ntree = 50,
nodesize = 5,
mtry = 2,
importance = TRUE,
metric = "RMSE")
library("caret")
caret.oob.model <- train(train[,-ncol(train)], train$SalePrice,
method = "rf",
ntree = 50,
tuneGrid = data.frame(mtry = 2),
nodesize = 5,
importance = TRUE,
metric = "RMSE",
trControl = trainControl(method = "oob", seed = 1),
allowParallel = FALSE)
But in caret.oob.model
there is an error
Error: Bad seeds: the seed object should be a list of length 2 with 1 integer vectors of size 1 and the last list element having at least a single integer.
it's my dataset https://drive.google.com/file/d/1el-gAgA93EbYnM6VnDqzhT5c5uWsnKvq/view?usp=sharing
How can I solve this problem?