Module: model_remediation.counterfactual.keras.utils

Utility functions and classes for integrating Counterfactual.


class CounterfactualPackedInputs: Named tuple containing inputs for the original and counterfactual data.


build_counterfactual_data(...): Build Counterfactual dataset from a list sensitive terms or custom function.

pack_counterfactual_data(...): Packs counterfactual_data with the original_input.

validate_counterfactual_structure(...): Validates that struct is a valid Counterfactual structure.