dirconn.RPDC#
- class dirconn.RPDC(order: int | str = 'bic', max_order: int = 10, n_freqs: int = 128, fmax: float | None = None, freqs: Any = None, demean: bool = True, n_folds: int = 5, check_order_stability: bool = True, check_whiteness: bool = True)#
Renormalised partial directed coherence (Schelter et al. 2009), a predictive measure.
values[source, target, f]islambdaof the influence ofsourceontarget: the squared real and imaginary part of the AR polynomial entryAbar[target, source](f), weighted by the inverse of their asymptotic covariance (seedirconn.methods.spectral.rpdc_from_coefs()). In the paper’s indices (itarget,jsource) it islambda_ij(f), stored atvalues[j, i, f]. UnlikePDCit is not normalised over the targets; it measures how far the direct influence atfis from zero relative to its estimation error, so it does not depend on the scale of the channels. With a real connectionlambdatends to a value that does not depend on the recording length;N lambdais the Wald statistic thatdirconn.analytic_rpdc_test()compares with the chi-square distribution.lambdaresolves frequency only from order 3 on. The real and imaginary part are two linear combinations of theordercoefficients of the pair, and a Wald statistic does not change under an invertible linear map: at order 1lambdais the same at every frequency, and at order 2 it is the same at every frequency other than 0 and the Nyquist frequency, where it equals the joint test of both lags in the time domain.The model is fitted by ordinary least squares only: the asymptotic covariance holds for that fit, so there is no
ridgeand rPDC suits a few channels (regions or selected sensors), not a high-dimensional sensor-level fit. Like every MVAR measure it is affected by volume conduction and leakage: an instantaneous mixture of sources changes the coefficients.- Parameters:
- __init__(order: int | str = 'bic', max_order: int = 10, n_freqs: int = 128, fmax: float | None = None, freqs: Any = None, demean: bool = True, n_folds: int = 5, check_order_stability: bool = True, check_whiteness: bool = True) None#
Methods
__init__([order, max_order, n_freqs, fmax, ...])fit(data)Estimate directed connectivity.
get_params()Return the constructor parameters as a dictionary.
Attributes
check_order_stabilitycheck_whitenessdemeanfmaxfreqsinfomax_ordern_foldsn_freqsorderridge