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.array or list[][] or pandas.DataFrame or 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.array or list[]) – The true labels or values for the provided dataset.

  • y_pred (numpy.array or list[][] or list[] or 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.array or list[]) – Feature names