pyriemann.datasets.make_classification_transfer¶
- pyriemann.datasets.make_classification_transfer(n_matrices, class_sep=3.0, class_disp=1.0, domain_sep=5.0, theta=0.0, stretch=1.0, random_state=None, class_names=[1, 2], domain_names=['source_domain', 'target_domain'])¶
Generate 2x2 SPD matrices for two classes in source and target domains.
Generate a set of 2x2 SPD matrices drawn from Riemannian Gaussian distributions, one per class and per domain. Currently, it supports two classes and two domains. The distributions have the same dispersions. You can stretch the target domain and control a rotation matrix that maps the source domain to the target domain. Useful for testing classification or clustering methods on transfer learning applications.
- Parameters:
- n_matricesint
Number of 2x2 matrices to generate for each class on each domain.
- class_sepfloat, default=3.0
Distance between the centers of the classes.
- class_dispfloat, default=1.0
Dispersion of the matrices for each class.
- domain_sepfloat, default=5.0
Distance between the global means of each source and target domains.
- thetafloat, default=0.0
Angle of the 2x2 rotation matrix from source to target domain.
- stretchfloat, default=1.0
Factor to stretch the matrices in target domain. Note that when it is != 1.0 the class dispersions in target domain will be different than those in source domain (fixed at class_disp).
- random_stateNone | int | RandomState instance, default=None
Pass an int for reproducible output across multiple function calls.
- class_nameslist, default=[1, 2]
Names of classes.
- domain_nameslist, default=[“source_domain”, “target_domain”]
Names of domains, source and target.
Added in version 0.8.
- Returns:
- X_encndarray, shape (4*n_matrices, 2, 2)
Set of 2x2 SPD matrices, for two classes and two domains.
- y_encndarray, shape (4*n_matrices,)
Extended labels for each matrix.
Notes
Added in version 0.4.