Description Usage Arguments Value Author(s) Examples
Trains a prediction model from an scPred
object
1 2 3 4 | trainModel(object, model = "svmRadial", resampleMethod = "cv",
number = 5, seed = 66, metric = c("ROC", "PR", "Accuracy",
"Kappa"), imbalance = 0.1, returnData = FALSE,
savePredictions = "final", allowParallel = FALSE)
|
object |
An |
model |
Classification model supported via |
resampleMethod |
Resample model used in |
number |
Number of iterations for resample method. See |
seed |
Numeric seed for resample method |
returnData |
If |
savePredictions |
an indicator of how much of the hold-out predictions for each resample should be saved. Values can be either "all", "final", or "none". A logical value can also be used that convert to "all" (for true) or "none" (for false). "final" saves the predictions for the optimal tuning parameters. |
A list of train
objects for each cell class (e.g. cell type). See train
function for details.
Jos<c3><a9> Alquicira Hern<c3><a1>ndez
1 2 3 4 5 6 7 | # Train a SVM with a Radial kernel
## A numeric seed is provided for the K-fold cross validation
## The metric ROC is used to select the best tuned model. "Accuracy" and "Kappa" may be used too.
object <- trainModel(object = object,
seed = 1234,
metric = "ROC")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.