pyriemann.datasets.generate_random_spd_matrix

pyriemann.datasets.generate_random_spd_matrix(n_dim, random_state=None, *, mat_mean=0.0, mat_std=1.0)

Generate a random SPD matrix.

Parameters:
n_dimint

Dimensionality of the matrix to sample.

random_stateint, RandomState instance or None, default=None

Pass an int for reproducible output across multiple function calls.

mat_meanfloat, default=0.0

Mean of random values to generate matrix.

mat_stdfloat, default=1.0

Standard deviation of random values to generate matrix.

Returns:
Cndarray, shape (n_dim, n_dim)

Random SPD matrix.

Notes

Added in version 0.3.