citk.tests.base module

class citk.tests.base.CITKTest(data, **kwargs)

Bases: CIT_Base

Abstract base class for all conditional independence tests in the citk package. It standardizes the interface to be compatible with causal-learn and implements a robust file-based caching mechanism.

__call__(X, Y, condition_set=None, **kwargs)

Perform an independence test.

Parameters:
  • X (column indices of data)

  • Y (column indices of data)

  • condition_set (conditioning variables, default None)

Returns:

p

Return type:

the p-value of the test

save_cache()

Explicitly saves the p-value cache to the file path provided during initialization. This is more reliable than relying on the garbage collector with __del__.

supported_dtypes = {}