Bridges
In bridges we provide wrappers for seamless integration with
CD-algorithm implemenations in other packages.
To integrate further third-party or your own algorithms and implemenations,
they only have to be wrapped to satisfy the format abstract_cd_t,
for more details see Abstract CD Specification.
Tigramite Integration
Bridge for tigramite integration.
Tigramite specializes to causal methods (including causal discovery) for time-series.
Our output-graphs (see graph_t) are in tigramite’s internal format,
and can be used directly e.g. with effect-estimation or mediation code from tigramite.
- alg_pcmci(data_format: IManageData, mci_transition_callback: IHandleExplicitTransitionToMCI = None, pcmci_obj_init_args: dict = {}, pcmci_obj_run_args: dict = {}) abstract_cd_t
Get PCMCI [RNK+19] implementation from tigramite. Use with
ControllerTimeseries.- Parameters:
data_format (IManageData) – data manager
mci_transition_callback (IHandleExplicitTransitionToMCI) – transition callback (typically
IndependenceAtoms_TimeSeries)pcmci_obj_init_args (dict) – forwarded to tigramites PCMCI constructor
pcmci_obj_run_args (dict) – forwarded to tigramites PCMCI.run_pcmci
- Returns:
PCMCI as abstract CD-algorithm.
- Return type:
- alg_pcmciplus(data_format: IManageData, mci_transition_callback: IHandleExplicitTransitionToMCI = None, pcmci_obj_init_args: dict = {}, pcmci_obj_run_args: dict = {}) abstract_cd_t
Get PCMCI+ [R20] implementation from tigramite. Use with
ControllerTimeseries.- Parameters:
data_format (IManageData) – data manager
mci_transition_callback (IHandleExplicitTransitionToMCI) – transition callback (typically
IndependenceAtoms_TimeSeries)pcmci_obj_init_args (dict) – forwarded to tigramites PCMCI constructor
pcmci_obj_run_args (dict) – forwarded to tigramites PCMCI.run_pcmciplus
- Returns:
PCMCI+ as abstract CD-algorithm.
- Return type:
- alg_lpcmci(data_format: IManageData, lpcmci_obj_init_args: dict = {}, lpcmci_obj_run_args: dict = {}) abstract_cd_t
Get LPCMCI [GR20] implementation from tigramite. Use with
ControllerTimeseriesLPCMCI.Note: In this case a transition callback
IHandleExplicitTransitionToMCIis notified by the controllerControllerTimeseriesLPCMCI.- Parameters:
data_format (IManageData) – data manager
lpcmci_obj_init_args (dict) – forwarded to tigramites LPCMCI constructor
lpcmci_obj_run_args (dict) – forwarded to tigramites LPCMCI.run_lpcmci
- Returns:
LPCMCI as abstract CD-algorithm.
- Return type:
Causal Learn Integration
Bridge for causal-learn [ZHC+24] integration. Causal Learn provides a broad range of causal methods, currently our framework is ready for use with their basic IID-data constraint-based CD-method implementations.
- alg_pc(data_format: IManageData, **runtime_args) abstract_cd_t
Get PC [SG91] implementation from causal learn.
- Parameters:
data_format (IManageData) – data manager
runtime_args – forwarded to causal-learns run_pc (together with “stable=False”)
- Returns:
PC as abstract CD-algorithm.
- Return type:
- alg_pc_stable(data_format: IManageData, **runtime_args) abstract_cd_t
Get PC-stable [CM+14] implementation from causal learn.
- Parameters:
data_format (IManageData) – data manager
runtime_args – forwarded to causal-learns run_pc (together with “stable=True”)
- Returns:
PC-stable as abstract CD-algorithm.
- Return type:
- alg_fci(data_format: IManageData, **runtime_args) abstract_cd_t
Get FCI [SGS01] implementation from causal learn.
- Parameters:
data_format (IManageData) – data manager
runtime_args – forwarded to causal-learns run_fci
- Returns:
FCI as abstract CD-algorithm.
- Return type: