View source: R/enr functions.R
en_kfold_accuracy_grid | R Documentation |
calculates accuracy of grid based ENR results (DOCUMENTATION COMING- CURRENT DOCUMENTATION INCORRECT)
en_kfold_accuracy_grid(
ddata,
response_var,
mod_alpha,
mod_lambda,
iter = 100,
k = 10,
seed = 123,
loo = FALSE,
eq_wt = FALSE,
type_meas = "deviance",
lr_cutoff = c(0.5)
)
ddata |
data frame containing the data to be modeled |
response_var |
string identifying the name of the outcome variable |
mod_alpha |
the alpha(s) value(s) to be checked. alpha is the ENR blending parameter that governs how much ridge regression (0) and lasso regression (1) will be used. |
mod_lambda |
the lambda(s) to be checked. lambda is the ENR penalty parameter for the ridge portion of the ENR |
iter |
the number of iterations to use |
k |
the number of folds to use |
seed |
the seed value for allowing results to be reproduced |
loo |
boolean indicating whether 'leave one out' cross validation should be used |
eq_wt |
boolean indicating whether the 0/1 classes should be balanced with weights. you may want to use this if there is a bad class imbalance |
type_meas |
the 'type measure' which is passed to cv.glmnet that governs its training penalty when tuning lambda. this should match arguments expected in cv.glmnet |
lr_cutoff |
vector of cutoff values to test/tune for optimization. the default is 'c(.5)' which is to say 'equal distance from all classes' which is typical in standard analyses |
en_kfold_accuracy_grid()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.