ARRCoefficient¶
- class torcheeg.transforms.ARRCoefficient(order: int = 4, norm: str = 'biased', apply_to_baseline: bool = False)[source][source]¶
Calculate autoregression reflection coefficients on the input data.
from torcheeg import transforms t = transforms.ARRCoefficient(order=4) t(eeg=np.random.randn(32, 128))['eeg'].shape >>> (32, 4)
- Parameters:
order (int) – The order of autoregressive process to be fitted. (default:
4
)norm (str) – Use a biased or unbiased correlation. (default:
biased
)apply_to_baseline – (bool): Whether to act on the baseline signal at the same time, if the baseline is passed in when calling. (default:
False
)
- __call__(*args, eeg: ndarray, baseline: ndarray | None = None, **kwargs) Dict[str, ndarray] [source][source]¶
- Parameters:
eeg (np.ndarray) – The input EEG signals or features.
baseline (np.ndarray, optional) – The corresponding baseline signal, if apply_to_baseline is set to True and baseline is passed, the baseline signal will be transformed with the same way as the experimental signal.
- Returns:
The autoregression reflection coefficients.
- Return type:
np.ndarray [number of electrodes, order]