powered by
Train various models.
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)
list representing the dataset from a metabolomics experiment.
models to be used in training.
metadata column class.
validation method.
number of folds in cross validation.
number of repeats.
number of levels for each tuning parameters.
dataframe with possible tuning values.
metric used to evaluate the model's performance. Can be "Accuracy" or "ROC".
summary function. For "ROC" the multiClassSummary function must be used.
boolean value to indicate if the class is in metadata.
boolean value to indicate if the var importance is calculated.
Returns a list with the results from training
The results from the best tunes of the models
The variable importance from the models
The full results from the tuning parameters of each model
The best tune of each model
The confusion matrices of the models (only in classification)
The final models
# NOT RUN { ## Example of training models library(specmine.datasets) data(cachexia) result = train_models_performance(cachexia, "pls", "Muscle.loss", "cv") # }
Run the code above in your browser using DataLab