Description Usage Arguments Value Examples
View source: R/machinelearning.R
Train various models.
1 2 3 4 | train_models_performance(dataset, models, column.class,
validation, num.folds = 10, num.repeats = 10, tunelength = 10,
tunegrid = NULL, metric = NULL, summary.function = "default",
class.in.metadata = TRUE, compute.varimp = TRUE)
|
dataset |
list representing the dataset from a metabolomics experiment. |
models |
models to be used in training. |
column.class |
metadata column class. |
validation |
validation method. |
num.folds |
number of folds in cross validation. |
num.repeats |
number of repeats. |
tunelength |
number of levels for each tuning parameters. |
tunegrid |
dataframe with possible tuning values. |
metric |
metric used to evaluate the model's performance. Can be "Accuracy" or "ROC". |
summary.function |
summary function. For "ROC" the multiClassSummary function must be used. |
class.in.metadata |
boolean value to indicate if the class is in metadata. |
compute.varimp |
boolean value to indicate if the var importance is calculated. |
Returns a list with the results from training
performance |
The results from the best tunes of the models |
vips |
The variable importance from the models |
full.results |
The full results from the tuning parameters of each model |
best.tunes |
The best tune of each model |
confusion.matrices |
The confusion matrices of the models (only in classification) |
final.models |
The final models |
1 2 3 4 5 | ## Example of training models
library(specmine.datasets)
data(cachexia)
result = train_models_performance(cachexia, "pls",
"Muscle.loss", "cv")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.