causal_testing.testing.data_adequacy

This module contains code to measure various aspects of causal test adequacy.

Module Contents

Classes

DataAdequacy

Measures the adequacy of a given test according to the Fisher kurtosis of the bootstrapped result.

Attributes

logger

causal_testing.testing.data_adequacy.logger
class causal_testing.testing.data_adequacy.DataAdequacy(kurtosis: pandas.Series = None, passing: int = None, results: dict = None, successful: int = None, bootstrap_size: int = None)

Measures the adequacy of a given test according to the Fisher kurtosis of the bootstrapped result.

  • Positive kurtoses indicate the model doesn’t have enough data so is unstable.

  • Negative kurtoses indicate the model doesn’t have enough data, but is too stable, indicating that the spread of inputs is insufficient.

  • Zero kurtosis is optimal.

to_dict(include_adequacy_results: bool = False)
Returns:

the adequacy object as a dictionary.

Parameters:

include_adequacy_results – Whether to serialise the results.