cv_model_with_auc: Perform Cross Validation for RFSLAM model

View source: R/rf_functions_p2.R

cv_model_with_aucR Documentation

Perform Cross Validation for RFSLAM model

Description

cv_model_with_auc performs cross validation and returns the average auc value across the folds for the model

Usage

cv_model_with_auc(
  modeling_df,
  target,
  id_col,
  risk_time_col,
  patient_count_col = "int.n",
  time_col,
  n.folds,
  folds_stratifier,
  drop,
  ntree = 100,
  nodedepth = NULL,
  nsplit = 10
)

Arguments

modeling_df

dataframe containing data for modeling

target

name of the target variable column

id_col

name of the column with the patient id's

risk_time_col

name of the column with the risk time values

patient_count_col

name of the column with the patient counts

n.folds

the number of folds for cross validation

folds_stratifier

the variable to use for creating the folds

drop

the variables that need to be dropped before training the model

ntree

number of trees for random forest

nodedepth

the node depth for random forest

nsplit

the nsplit parameter for random forest

Value

the average weighted auc value across all of the folds


dshenker/RFSLAM documentation built on Sept. 18, 2022, 3:26 a.m.