f_rf_auc_balanced {collinear}R Documentation

AUC of Random Forest model of a balanced binary response

Description

Computes a univariate random forest model cases via ⁠\link[ranger]{ranger}⁠ and returns the Area Under the Curve on the out-of-bag data.

Usage

f_rf_auc_balanced(x, y, df)

Arguments

x

(required, character string) name of the predictor variable.

y

(required, character string) name of the binary response variable

df

(required, data frame) data frame with the columns 'x' and 'y'.

Value

Area Under the Curve

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_balanced(
    x = "growing_season_length", #predictor
    y = "vi_binary",               #response
    df = vi
  )

}


[Package collinear version 1.1.1 Index]