aif360.explainers

Metric Text Explainer

class aif360.explainers.MetricTextExplainer(metric)[source]

Class for explaining metric values with text.

These briefly explain what a metric is and/or how it is calculated unless it is obvious (e.g. accuracy) and print the value.

This class contains text explanations for all metric values regardless of which subclass they appear in. This will raise an error if the metric does not apply (e.g. calling true_positive_rate if type(metric) == DatasetMetric).

Initialize a MetricExplainer object.

Parameters:metric (Metric) – The metric to be explained.

Metric JSON Explainer

class aif360.explainers.MetricJSONExplainer(metric)[source]

Class for explaining metric values in JSON format.

These briefly explain what a metric is and/or how it is calculated unless it is obvious (e.g. accuracy) and print the value.

This class contains JSON explanations for all metric values regardless of which subclass they appear in. This will raise an error if the metric does not apply (e.g. calling true_positive_rate if type(metric) == DatasetMetric).

Initialize a MetricExplainer object.

Parameters:metric (Metric) – The metric to be explained.