dataeval.outputs.BalanceOutput

class dataeval.outputs.BalanceOutput

Output class for balance() bias metric.

balance

Estimate of mutual information between metadata factors and class label

Type:

NDArray[np.float64]

factors

Estimate of inter/intra-factor mutual information

Type:

NDArray[np.float64]

classwise

Estimate of mutual information between metadata factors and individual class labels

Type:

NDArray[np.float64]

factor_names

Names of each metadata factor

Type:

list[str]

class_names

List of the class labels present in the dataset

Type:

list[str]

plot(row_labels=None, col_labels=None, plot_classwise=False, factor_type='discrete')

Plot a heatmap of balance information.

Parameters:
row_labels : ArrayLike or None, default None

List/Array containing the labels for rows in the histogram

col_labels : ArrayLike or None, default None

List/Array containing the labels for columns in the histogram

plot_classwise : bool, default False

Whether to plot per-class balance instead of global balance

factor_type : "discrete", "continuous", or "both", default "discrete"

Whether to plot discretized values, continuous values, or to include both

Return type:

matplotlib.figure.Figure

Notes

This method requires matplotlib to be installed.

property meta : ExecutionMetadata

Metadata about the execution of the function or method for the Output class.

Return type:

ExecutionMetadata