Description Usage Arguments Value
Train machine learning classification models on time to event data using the caret package
1 2 3 | train_classifier(form, dat, method = "gbm", predict.times,
trControl = NULL, parallel = FALSE, mc.cores = 2, seed = 123,
...)
|
form |
survival formula |
dat |
data frame |
method |
classifcation algorithm. The following algorithms have been implemented.
|
predict.times |
survival prediction times |
trControl |
control parameters for the caret train function. Set to NULL to use a default 5-fold cross-validation |
parallel |
run cross-validation in parallel? Uses mclapply which works only on linux |
... |
further arguments passed to caret or other methods. |
tuneLength |
same as tuneLength in the caret package |
returns a list with items:
finalModel: final model trained on the complete data (dat) using optimal tuning paramters
fitted: predictions on complete data (dat)
threshold: optimal classification threshold
resamples: cross-validation results: predictions on resampled data
predict.times: survival prediction times
bestTune: optimal tuning parameters
method: classification algorithm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.