pyriemann.transfer.encode_domains(X, y, domain)

Encode the domains of the matrices in the labels.

We handle the possibility of having different domains for the datasets by extending the labels of the matrices and including this information to them. For instance, if we have a matrix X with class left_hand on the domain_01 then its extended label will be domain_01/left_hand. Note that if the classes were integers at first, they will be converted to strings.

Xndarray, shape (n_matrices, n_channels, n_channels)

Set of SPD matrices.

yndarray, shape (n_matrices,)

Labels for each matrix.

domainndarray, shape (n_matrices,)

Domains for each matrix.

X_encndarray, shape (n_matrices, n_channels, n_channels)

The same set of SPD matrices given as input.

y_encndarray, shape (n_matrices,)

Extended labels for each matrix.

See also



New in version 0.3.1.