Fits a binomial logistic Generalized Additive Model (GAM) y ~ s(x, k = 3)
between a binary response and a numeric predictor and returns the Area Under the Curve of the observations versus the predictions.
See also
Other preference_order:
auc_score()
,
case_weights()
,
f_gam_auc_unbalanced()
,
f_gam_deviance()
,
f_logistic_auc_balanced()
,
f_logistic_auc_unbalanced()
,
f_rf_auc_balanced()
,
f_rf_auc_unbalanced()
,
f_rf_rsquared()
,
f_rsquared()
,
preference_order()
Examples
data(vi)
#subset to limit example run time
vi <- vi[1:1000, ]
#this example requires "mgcv" installed
if(requireNamespace(package = "mgcv", quietly = TRUE)){
f_gam_auc_balanced(
x = "growing_season_length", #predictor
y = "vi_binary", #response
df = vi
)
}
#> [1] 0.9367964