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

View source: R/fasi.R

rscoreR Documentation

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 implimented.

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, T/F, that determines if the r-score or r-score plus is calculated.

r2_indicator

Logical variable, T/F, 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


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


bradleyrava/fasi documentation built on May 12, 2024, 6:23 a.m.