View source: R/model_fitting.R
fitMPRModelCV | R Documentation |
fitMPRModelCV
fitMPRModelCV(
type,
method,
trainXs,
trainY,
testXs = NULL,
testY = NULL,
tteColname = "time_to_event",
eventColname = "Event",
parallel = FALSE,
seed = NULL,
save = TRUE,
nFolds = 3,
foldID = NULL,
saveSuffix = NULL,
...
)
type |
A string representing the type of model. Can be |
method |
The modelling method. Currently supports |
trainXs |
The training data matrix/data.frame. |
trainY |
The training response variable. This should be a vector if
|
testXs |
The test data matrix/data.frame. |
testY |
The test response variable. This should be a vector if
|
tteColname |
A string corresponding to the time-to-event column name in
|
eventColname |
A string corresponding to the event column name in
|
parallel |
A boolean specifying whether parallel computation should be used in model fitting. |
seed |
An integer to set the random seed to for model fitting. |
save |
A boolean specifying if the model object should be saved to the logs. |
nFolds |
The number of cross-validation folds to use. |
foldID |
A vector of integers with length equal to the number of rows in
|
saveSuffix |
Optional - a custom suffix to include in the file name of the saved model object after the timestamp. |
... |
The remaining parameters to be passed to the cross-validation function. |
Fits the specified model, selecting the best performing set of hyperparameters from a k-fold cross-validation using each combination of hyperparameters in a grid search.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.