fatf.fairness.data.measures
.systemic_bias_check¶
-
fatf.fairness.data.measures.
systemic_bias_check
(systemic_bias_matrix: numpy.ndarray) → bool[source]¶ Indicates whether a dataset has a systemic bias.
- Parameters
- systemic_bias_matrixnumpy.ndarray
A square (equal number of rows and columns) boolean numpy array that indicates which pair of data points share the same unprotected features but differ in protected features and ground truth annotation. (The number of rows/columns should be equal to the number of data points in the original data set.)
- Returns
- systemic_bias_presentboolean
True
if systemic bias is present,False
otherwise.
- Raises
- IncorrectShapeError
The systemic bias matrix is not 2-dimensional or square.
- TypeError
The systemic bias matrix is not of boolean type.
- ValueError
The systemic bias matrix is a structured numpy array or is not diagonally symmetric.