nigsp.operations.surrogates.random_sign¶
- nigsp.operations.surrogates.random_sign(eigenvec, n_surr=1000, seed=42, stack=False)[source]¶
Create surrogates by randomly switching signs of eigenvectors.
- Parameters:
- eigenvec
numpy.ndarray A matrix of eigenvectors.
- n_surr
int, optional Number of surrogates to create.
- seed
intorNone, optional Random seed (for repeatability).
- stack
bool, optional If True, add original eigenvec as last entry of the last dimension of the created surrogate matrix.
- eigenvec
- Returns:
numpy.ndarrayThe matrix of surrogates, of shape
(eigenvec * n_surr(+1),).
- Raises:
NotImplementedErrorIf eigenvec is 4+ D.