Description Usage Arguments Value Examples
View source: R/multipleModels.R
Training multiple models for benchmark comparison
1 | multipleModels(train, test, y, metric, nfolds, repeats, models)
|
train |
A training data frame |
test |
A testing data frame |
y |
Response variable |
metric |
A minimization metric for training. If not mentioned, for regression RMSE and for classification Kappa value will be used. |
nfolds |
Number of kfolds for cross validation. By default, 5 will be used. |
repeats |
Number of repeats for cross validation. By default, 5 will be used. |
models |
A character list of models to train based on caret package structure |
summary of all trained models and trained models
1 2 3 4 5 6 7 | #data("iris")
# multipleModels(train = iris, test = iris, y = "Species", models = c("C5.0", "parRF"))
## results
## Accuracy Kappa AccuracyLower AccuracyUpper AccuracyNull AccuracyPValue McnemarPValue
##C5.0 1.00 1.00 0.9757074 1.0000000 0.3333333 2.702787e-72 NaN
##parRF 0.96 0.94 0.9149722 0.9851815 0.3333333 2.525127e-60 NaN
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.