pyriemann.datasets.make_matrices

pyriemann.datasets.make_matrices(n_matrices, n_dim, kind, rs=None, return_params=False, evals_low=0.5, evals_high=2.0, eigvecs_same=False)

Generate a set of matrices, with specific properties.

Parameters:
n_matricesint

Number of matrices to generate.

n_dimint

Dimension of square matrices to generate.

kind{‘real’, ‘comp’, ‘spd’, ‘spsd’, ‘hpd’, ‘hpsd’}

Kind of matrices to generate:

  • ‘real’ for real-valued matrices;

  • ‘comp’ for complex-valued matrices;

  • ‘spd’ for symmetric positive-definite matrices;

  • ‘spsd’ for symmetric positive semi-definite matrices;

  • ‘hpd’ for Hermitian positive-definite matrices;

  • ‘hpsd’ for Hermitian positive semi-definite matrices.

rsRandomState instance, default=None

Random state for reproducible output across multiple function calls.

return_paramsbool, default=False

If True, then returns evals and evecs for ‘spd’, ‘spsd’, ‘hpd’ and ‘hpsd’.

evals_lowfloat, default=0.5

Lowest value of the uniform distribution to draw eigen values.

evals_highfloat, default=2.0

Highest value of the uniform distribution to draw eigen values.

eigvecs_samebool, default False

If True, then uses the same eigen vectors for all matrices.

Returns:
matsndarray, shape (n_matrices, n_dim, n_dim)

Generated matrices.

evalsndarray, shape (n_matrices, n_dim)

Eigen values used for ‘spd’, ‘spsd’, ‘hpd’ and ‘hpsd’. Only returned if return_params=True.

evecsndarray, shape (n_matrices, n_dim, n_dim) or (n_dim, n_dim)

Eigen vectors used for ‘spd’, ‘spsd’, ‘hpd’ and ‘hpsd’. Only returned if return_params=True.

Notes

New in version 0.5.