Description Usage Arguments Details Value
View source: R/crossvalidate.R
Perform 10-fold cross-validation on a matrix of ToF data. This produces a 'caret::train' object containing lots of relevant information. One can extract predictions made and use these to determine accuracy.
1 2 | crossvalidate(data_matrix, labels, model = "xgbTree", n_folds = 10,
tune = FALSE, hyperparams = "tof")
|
data_matrix |
A matrix of ToF data |
labels |
A character vector of class labels (shoulkd have 2 unique values) |
model |
The model to use |
n_folds |
number of folds in crossvalidation |
tune |
Whether to tune hyper-parameters (TRUE), or use defaults (FALSE) |
hyperparams |
One of 'tof' or 'gcims' whether the default hyper- parameters have been picked for tof data or gc-ims data. No effect if tune = TRUE. |
The caret::train object also includes a classifier trained on the full dataset. #' This can be used to make further predictions on new data, such as a validation set.
A caret::train object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.