model_remediation.counterfactual.keras.utils.CounterfactualPackedInputs

Named tuple containing inputs for the original and counterfactual data.

CounterfactualModel default implementations functions use this class to pack and unpack the separate components required for Counterfactual and regular training.

original_input Batch of inputs that would originally (i.e. without applying Counterfactual) be passed in to a model's Model.call method. This corresponds to the x component described in tf.keras.Model.fit.
counterfactual_data Counterfactual value based on original_x that has been modified. Should be the form (orginal_x, counterfactual_x, counterfactual_sample_weight).