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
int
orNone
, 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.ndarray
The matrix of surrogates, of shape
(eigenvec * n_surr(+1),)
.
- Raises:
NotImplementedError
If eigenvec is 4+ D.