rscore: Calculate the r1 or r2 score for a new observation in ones...

Description Usage Arguments Details Value Author(s) Examples

View source: R/fasi.R

Description

This function calculates an r-score for a given ranking score. It requires a calibration and testing dataset. Both the r-score+ and r-score can be implemented.

Usage

1
2
3
4
5
6
7
8
9
rscore(
  s_test_cur,
  y_class_cur,
  a_cur,
  z_cal,
  z_test,
  rscore_plus,
  r2_indicator
)

Arguments

s_test_cur

The current ranking score from the test data to be evaluated.

y_class_cur

The class label you want to generate the r-scores for.

a_cur

The current protected group from the test data to be evaluated.

z_cal

The calibration data set.

z_test

The test data set.

rscore_plus

Logical variable, TRUE/FALSE, that determines if the r-score or r-score plus is calculated.

r2_indicator

Logical variable, TRUE/FALSE, that determines if the r1 or r2 score is calculated.

Details

Do not call this function externally. It is only meant to be called from within the fasi function.

Value

The r-score corresponding to s_test_cur.

Author(s)

Bradley Rava. PhD Candidate at the University of Southern California's Marshall School of Business. Department of Data Sciences and Operations.

Examples

1
rscore(s_test_cur, y_class_cur, a_cur, z_cal, z_test, rscore_plus, r2_indicator)

fasi documentation built on Aug. 2, 2021, 9:06 a.m.