Learn R Programming

caretEnsemble (version 1.0.0)

safeOptAUC: Safe optimization of the AUC

Description

This algorithm optimizes the AUC for regression models to avoid ensembling where the ensembled model fits worse than any component model

Usage

safeOptAUC(X, Y, iter = 100L)

Arguments

X
the matrix of predictors
Y
the dependent variable
iter
an integer for the number of iterations

Value

  • A numeric of the weights for each model

Details

This optimizer uses a stopping criterion that if the optimized model has an AUC that is worse than any individual model, it continues optimizing until this is no longer the case. If it fails to surpass any component model it issues a warning and weights the best model 1 and all other models 0.

Examples

Run this code
x <- matrix(runif(10), ncol=2)
y <- sample(c('Y', 'N'), 5, replace=TRUE)
safeOptAUC(x, y, iter = 2L)

Run the code above in your browser using DataLab