I was trying to pass three fairness objects into fairness_check to plot them all at once. This was the error I received:
Error in fairness_check(fairness_train_sex_cutoff, protected = analysis_train$sex, :
object 'parity_loss' not found
It looks like when an explainer is not passed to fairness_check the parity loss object is not created but the names of this object are referenced later [colnames(parity_loss_metric_data) <- names(parity_loss)] so the function fails
I was trying to pass three fairness objects into fairness_check to plot them all at once. This was the error I received:
Error in fairness_check(fairness_train_sex_cutoff, protected = analysis_train$sex, :
object 'parity_loss' not found
It looks like when an explainer is not passed to fairness_check the parity loss object is not created but the names of this object are referenced later [colnames(parity_loss_metric_data) <- names(parity_loss)] so the function fails