roiextract.pipeline.SymmetricOrthogonalization#
- class roiextract.pipeline.SymmetricOrthogonalization(n_iter=50, tol=1e-06, use_previous_d=False)#
Symmetric orthogonalization of the input time series. The implementation follows [1] and is based on the
mne_connectivity.symmetric_orth()implementation. This step is useful for reducing the effects of signal leakage in source-reconstructed MEG/EEG data.- Parameters:
- n_iter
int, optional The maximum number of iterations for the orthogonalization algorithm.
- tol
float, optional The tolerance for convergence. The algorithm stops when the relative change in the error is below this threshold.
- use_previous_dbool, optional
Set this to
Trueto match the MNE-connectivity implementation. By default, only the D matrix from the final iteration is used for calculating the orthogonalization weights. See the reference paper and source code for more details.
- n_iter
Methods
copy()Create a copy of the pipeline step.
fit(data, **kwargs)Fit the symmetric orthogonalization step to the provided data.
fit_transform(data)Fit the step to the provided data and then apply symmetric orthogonalization.
get_names(names)Get the names of the rows of the weight matrix, which correspond to the orthogonalized components.
Get the parameters of the symmetric orthogonalization step as a dictionary.
Get the weight matrix corresponding to the linear transformation defined by the symmetric orthogonalization step.
transform(data)Apply symmetric orthogonalization to the provided data.
References
- copy()#
Create a copy of the pipeline step.
- Returns:
- copy
PipelineStep A copy of the pipeline step.
- copy
- fit(data, **kwargs)#
Fit the symmetric orthogonalization step to the provided data.
- Parameters:
- data
array The input data to fit the step to.
- data
- Returns:
- self
SymmetricOrthogonalization The fitted instance of the symmetric orthogonalization step.
- self
- fit_transform(data)#
Fit the step to the provided data and then apply symmetric orthogonalization.
- Parameters:
- data
array The input data to fit and transform.
- data
- get_names(names)#
Get the names of the rows of the weight matrix, which correspond to the orthogonalized components.
- get_params()#
Get the parameters of the symmetric orthogonalization step as a dictionary.
- Returns:
- params
dict A dictionary containing the parameters of the symmetric orthogonalization step.
- params