pyriemann.datasets.make_gaussian_blobs¶
- pyriemann.datasets.make_gaussian_blobs(n_matrices=100, n_dim=2, class_sep=1.0, class_disp=1.0, return_centers=False, center_dataset=False, random_state=None, centers=None, *, n_jobs=1, sampling_method='auto')¶
Generate SPD matrices for two classes.
Generate a set of SPD matrices drawn from Riemannian Gaussian distributions, one per class. Currently, it supports two classes. The distributions have the same dispersions. Useful for testing classification or clustering methods.
- Parameters:
- n_matricesint, default=100
Number of matrices to generate for each class.
- n_dimint, default=2
Dimensionality of the generated SPD matrices.
- class_sepfloat, default=1.0
Distance between the centers of the classes.
- class_dispfloat, default=1.0
Dispersion of the matrices for each class.
- centersNone | ndarray, shape (2, n_dim, n_dim), default=None
Centers for each class. If None, the centers are drawn randomly based on class_sep.
- return_centersbool, default=False
If True, return the centers of each class.
- center_datasetbool, default=False
If True, re-center dataset to the Identity. If False, dataset is centered around a random SPD matrix.
- random_stateint, RandomState instance or None, default=None
Pass an int for reproducible output across multiple function calls.
- n_jobsint, default=1
The number of jobs to use for the computation. This works by computing each of the class centroid in parallel. If -1 all CPUs are used.
- sampling_method{“auto”, “slice”, “rejection”}, default=”auto”
Method used to sample eigenvalues: “auto”, “slice” or “rejection”. If “auto”, sampling_method will be equal to “slice” for n_dim != 2 and equal to “rejection” for n_dim = 2.
Added in version 0.4.
- Returns:
- Xndarray, shape (2*n_matrices, n_dim, n_dim)
Set of SPD matrices, for two classes.
- yndarray, shape (2*n_matrices,)
Labels corresponding to each matrix.
- centersndarray, shape (2, n_dim, n_dim)
The centers of each class. Only returned if
return_centers=True.
Notes
Added in version 0.3.