Learn R Programming

fasi (version 1.0.0)

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

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

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.

Value

The r-score corresponding to s_test_cur.

Details

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

Examples

Run this code
# NOT RUN {
rscore(s_test_cur, y_class_cur, a_cur, z_cal, z_test, rscore_plus, r2_indicator)
# }

Run the code above in your browser using DataLab