Description Usage Arguments Value Examples
Function takes a list with integer vectors representing fold indicies or a single integer vector representing these indicies and predict outcomes based on the training results
1 2 3 | train_predict(folds, X_y)
train_predict(folds, X_y)
|
folds |
A list with integer vectors |
X_y |
A list with predictor matrix and response vector |
folds |
An integer vectors or a list containing integer vectors |
X_y |
A list containing the predictor matrix 'X' and the outcome vector 'y' |
A numeric vector containing AUC values
A dataframe containing the actual outcome and the predicted value
1 2 3 4 5 6 7 8 9 10 11 12 | data(pedis)
X_y <- prepare_X_y(pedis, outcome = "minor_amputation", vars = c("p", "d"))
folds <- create_folds(y = X_y$y)
fit <- train_pedis(X = X_y$X, y = X_y$y, folds = folds)
map_train_auc(folds = folds, X_y = X_y)
data(pedis)
X_y <- prepare_X_y(data = pedis, outcome = "minor_amputation", vars = c("p", "d"))
fold_idx <- 1:10
train_predict(folds = 1:10, X_y = X_y)
folds <- list(1:10, 11:20)
train_predict(folds = folds, X_y = X_y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.