dataeval.bias.ParityOutput

class dataeval.bias.ParityOutput

Output class for the Parity bias evaluator.

Warning

This class is experimental and may change or be removed in future releases.

Contains a polars DataFrame with Cramér’s V scores and threshold flags.

factors

DataFrame with columns: - factor_name: str - Name of the metadata factor - score: float - Bias-Corrected Cramér’s V statistic - p_value: float - P-value from G-test (Log-Likelihood Ratio) - is_correlated: bool - True if score >= score_threshold AND p_value <= p_value_threshold - has_insufficient_data: bool - True if any cells have < 5 samples

Type:

pl.DataFrame

insufficient_data

Dictionary flagging specific data subsets with low sample counts (< 5). Structure: {factor_name: {factor_category_value: {class_label: count}}}.

Type:

dict[str, dict[int, dict[str, int]]]

data()

Return the output data as a dictionary.

Return type:

dict[str, Any]

meta()

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

Return type:

ExecutionMetadata