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 linki (t - tau) -> j (t)at the lagtauwhose 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), andtau_maxis that order ormin_lag_secondsin samples (rounded up), whichever is larger, at mostmax_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_maxis a criterion, and the cap oftau_max.min_lag_seconds (float) – Shortest delay range that a criterion-based
tau_maxmust 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
infomax_ordermin_lag_secondspc_alphatau_max