fairlearn.widget package

Package for the Fairlearn Dashboard widget.

class fairlearn.widget.FairlearnDashboard(*, sensitive_features, y_true, y_pred, sensitive_feature_names=None)[source]

Bases: object

The dashboard class, wraps the dashboard component.

Parameters
  • sensitive_features (numpy.ndarray, list[][], pandas.DataFrame, pandas.Series) – A matrix of feature vector examples (# examples x # features), these can be from the initial dataset, or reserved from training.

  • y_true (numpy.ndarray, list[]) – The true labels or values for the provided dataset.

  • y_pred (numpy.ndarray, list[][], list[], dict {string: list[]}) – Array of output predictions from models to be evaluated. Can be a single array of predictions, or a 2D list over multiple models. Can be a dictionary of named model predictions.

  • sensitive_feature_names (numpy.ndarray, list[]) – Feature names