powered by
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.
rscore( s_test_cur, y_class_cur, a_cur, z_cal, z_test, rscore_plus, r2_indicator )
The current ranking score from the test data to be evaluated.
The class label you want to generate the r-scores for.
The current protected group from the test data to be evaluated.
The calibration data set.
The test data set.
Logical variable, TRUE/FALSE, that determines if the r-score or r-score plus is calculated.
Logical variable, TRUE/FALSE, that determines if the r1 or r2 score is calculated.
The r-score corresponding to s_test_cur.
Do not call this function externally. It is only meant to be called from within the fasi function.
# 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