[R] Different number of resamples error
javed khan
j@vedbtk111 @end|ng |rom gm@||@com
Thu Feb 20 21:54:50 CET 2020
Hello to all
I have different train functions for NN, SVM and GBM and when I combine the
results using bwplot, it gives me the error " Different number of resamples
in each model". It gives me the results (MAE values) but using the boxplot,
it gives the error. The code is as follows:
set.seed(30218)
nnet1 <- train(results~ ., data = tr,
method = "nnet",
metric = "MAE",
trControl = ctrl,
preProc = c("center", "scale", "zv"),
tuneGrid = data.frame(decay = (1),
size = (1.3801517)))
nnet1$results
///For SVM
set.seed(30218)
svm1 <- train(results ~ ., data = tr,
method = "svmRadial",
metric = "MAE",
preProc = c("center", "scale", "zv"),
trControl = ctrl,
tuneGrid=expand.grid(sigma = (0.5),
C = c(1.348657)))
getTrainPerf(svm1)
svm1$results
//For GBM
set.seed(30218)
gbm <- train(results ~ ., data = tr,
method = "gbm",
preProc = c("center", "scale", "zv"),
metric = "MAE",
tuneGrid = data.frame(n.trees = (200.09633523),
interaction.depth = (1),
shrinkage=(0.1), n.minobsinnode=(10)))
gbm$results
//Then the boxplot
rvalues=resamples(list(nnet=nnet1, svm=svm1, GBM=gbm))
bwplot(rvalues, metric="MAE")
[[alternative HTML version deleted]]
More information about the R-help
mailing list