AUC of Random Forest model of an unbalanced binary response
Source:R/preference_order.R
f_rf_auc_unbalanced.Rd
Computes a univariate random forest model with weighted cases via \link[ranger]{ranger}
and returns the Area Under the Curve on the out-of-bag data.
See also
Other preference_order:
auc_score()
,
case_weights()
,
f_gam_auc_balanced()
,
f_gam_auc_unbalanced()
,
f_gam_deviance()
,
f_logistic_auc_balanced()
,
f_logistic_auc_unbalanced()
,
f_rf_auc_balanced()
,
f_rf_rsquared()
,
f_rsquared()
,
preference_order()
Examples
data(vi)
#subset to limit example run time
vi <- vi[1:1000, ]
#this example requires "ranger" installed in the system
if(requireNamespace(package = "ranger", quietly = TRUE)){
f_rf_auc_unbalanced(
x = "growing_season_length", #predictor
y = "vi_binary", #response
df = vi
)
}
#> [1] 0.9158895