predict.fasi | R Documentation |
After a model is trained with the fasi function, predict estimates the r-scores and classification of all observations in the test data set.
## S3 method for class 'fasi'
predict(
object,
test_data,
alpha_1,
alpha_2,
rscore_plus = T,
ptd_group_var = "a",
class_label = "y",
ranking_score_calibrate,
ranking_score_test,
indecision_choice = "2",
...
)
object |
An object of class fasi. It can be created from the fasi function. |
test_data |
The test data set that contains new observations to be classified. |
alpha_1 |
User specified group and overall FSR control for class 1. |
alpha_2 |
User specified group and overall FSR control for class 2. |
rscore_plus |
A logical variable that indicates if the r-score or r-score plus is calculated. By default the r-score plus is calculated. |
ptd_group_var |
The name of the protected group variable in your data set. Defaults to "a". |
class_label |
The name of the class label variable in your data set. Defaults to "y". |
ranking_score_calibrate |
A vector of ranking scores for the calibration data set. This should only be used if the built in ranking score algorithms are not used. |
ranking_score_test |
A vector of ranking scores for the test data set. This should only be used if the built in ranking score algorithms are not used. |
indecision_choice |
A number, 1, 2, or 3. This determines how the indecisions are treated if we are equally confident in placing them in both class 1 and 2. Defaults to the scenario where class 2 is perfered. |
... |
Additional arguments |
Bradley Rava. PhD Candidate at the University of Southern California's Marshall School of Business. Department of Data Sciences and Operations.
fasi_object <- fasi(observed_data, model_formula, split_p=0.5, alg="gam", class_label="y")
predict(fasi_object, test_data, alpha_1=0.1, alpha_2=0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.