bin_misclass: Bin misclassification metrics

Description Usage Arguments Details Value

Description

Get misclassification error, sensitivity, specificity, precision, and other classification performance statistics for different subsets (i.e., bins) of the dataset.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
bin_misclass(
  in_predictions = NULL,
  in_resampleresult = NULL,
  in_gaugestats = NULL,
  binvar,
  binfunc,
  binarg,
  interthresh = 0.5,
  spatial_rsp = NULL,
  rspcol = NULL
)

Arguments

in_predictions

a data.table of predictions for a set of CV repetitions.

in_gaugestats

data.table with additional columns to use in binning if not included as predictor variables in model.

binvar

(character) column that will be used to define bins.

binfunc

(character) binning approach. One of 'manual', 'equal_length', 'equal_freq'. See bin_dt.

binarg

(numeric) binning argument, depends on binning approach. See bin_dt.

interthresh

(numeric) flow intermittence probability threshold above which to classify records as non-perennial

spatial_rsp

whether to use results from spatial (TRUE) or non-spatial (FALSE) cross-validation (only used if in_rftuned is provided, not in_predictions).

rspcol

column to use that contains predicted probabilities (only used if in_predictions is provided, not in_rftuned).

in_rftuned

Output from selecttrain_rf; list containing inner and outer resampling results + task.

Details

This function was used for internal assessment of model performance. Right now, the options to change binvar and binfunc are not working (need some adjustment); only manual binning based on long-term mean annual discharge ('dis_m3_pyr') is possible. Update instances of 'dis_m3_pyr' for changing.

Value

data.table with performance statistics by subset.


messamat/globalIRmap documentation built on July 4, 2021, 10:48 a.m.