dirconn.PCMCI#

class dirconn.PCMCI(tau_max: int | str = 'bic', max_order: int = 10, pc_alpha: float = 0.2, min_lag_seconds: float = 0.03)#

PCMCI with the partial-correlation (ParCorr) test, lagged links only.

values[i, j] is the MCI partial correlation of the link i (t - tau) -> j (t) at the lag tau whose MCI p-value is smallest; it is signed (a negative coupling gives a negative value) and lies between -1 and 1. The chosen lags, the lag-resolved values and p-values, and the per-cell p-values (smallest over the lags times the number of lags) are in the provenance; pcmci_test() returns those p-values as a test result. The diagonal (a channel’s own past) is undefined (NaN) here, although PCMCI uses it as a condition. Several trials are analysed together with tigramite’s multiple-dataset mode. This is predictive dependence given the selected conditions, not interventional causality.

Parameters:
  • tau_max (int or {"aic", "bic", "hqc", "cv"}) – Largest lag tested, in samples. A criterion picks the order of the pooled VAR model of all channels (as for GC), and tau_max is that order or min_lag_seconds in samples (rounded up), whichever is larger, at most max_order. Links at longer lags are not tested at all, and the VAR order describes the fit of a model, not the longest coupling delay: with the BIC order alone a 3-sample delay was missed in the reference scenarios (docs/method_validation.md, finding 13). An integer is used as given; give one that covers the delays you expect when you know them.

  • max_order (int) – Largest candidate when tau_max is a criterion, and the cap of tau_max.

  • min_lag_seconds (float) – Shortest delay range that a criterion-based tau_max must cover, in seconds (default 30 ms, a common cortico-cortical conduction delay; 0 switches the floor off). More lags cost run time and, through the Bonferroni over the lags, some power.

  • pc_alpha (float) – Significance level of the parent selection (tigramite’s default 0.2).

__init__(tau_max: int | str = 'bic', max_order: int = 10, pc_alpha: float = 0.2, min_lag_seconds: float = 0.03) → None#

Methods

__init__([tau_max, max_order, pc_alpha, ...])

fit(data)

Estimate directed connectivity.

get_params()

Return the constructor parameters as a dictionary.

Attributes

info

max_order

min_lag_seconds

pc_alpha

tau_max