Description Usage Arguments Value Note
This function wraps the train
function in the caret
package with model accuracy reports.
It also allows for errors in fitting models to be caught to make it easier to use in a loop.
1 2 3 |
method |
a a string specifying which classification or regression model to use. Possible values are found using |
datatype |
a named character representing the accuracy object be built on either "train" or "test" data, user can include both |
traindata |
a list of length two containing a named slot for the matrix of predictors (pred) and the vector of classes (class) |
testdata |
a list of length two containing a named slot for the matrix of predictors (pred) and the vector of classes (class) |
modelKeep |
a logical indicating whether the original model object should be stored |
length |
an integer denoting the number of levels of each tuning parameter
that should be generated to be passed to |
fitControl |
an object generated by |
metric |
a character string passed to |
cores |
An integer representing the number of cores to use on Windows. If not on windows, a warning is issued. |
... |
Additional arguments to be passed to |
A character string with an error if unsuccessful. The result of the modAcc
call if successful:
method - the train
method used to fit the model
summaryTr - the ROCit
for the training data
summaryTe - the ROCit
for the test data
time - the time reported for the model to run, taken from the train
object if available
The values presented are for the optimal threshold as computed by the roc
function.
For some model types linear combos of predictors may be omitted.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.