skada.MMDLSConSMappingAdapter

skada.MMDLSConSMappingAdapter(gamma, reg_k=1e-10, reg_m=1e-10, tol=1e-05, max_iter=100)[source]

Location-Scale mapping minimizing the MMD with a Gaussian kernel.

MMDLSConSMapping finds a linear transformation that minimizes the Maximum Mean Discrepancy (MMD) between the source and target domains, such that $X^t = W(y^s) \odot X^s + B(y^s)$, where $W(y^s)$ and $B(y^s)$ are the scaling and bias of the linear transformation, respectively.

See Section 4 of [21] for details.

Parameters:
gammafloat

Parameter for the Gaussian kernel.

reg_kfloat, default=1e-10

Regularization parameter for the labels kernel matrix.

reg_mfloat, default=1e-10

Regularization parameter for the mapping parameters.

tolfloat, default=1e-5

Tolerance for the stopping criterion in the optimization.

max_iterint, default=100

Number of maximum iteration before stopping the optimization.

References

[21]

Kun Zhang et. al. Domain Adaptation under Target and Conditional Shift In ICML, 2013.

Attributes:
`W_`array-like, shape (n_samples, n_features)

The scaling matrix.

`B_`array-like, shape (n_samples, n_features)

The bias matrix.

`G_`array-like, shape (n_classes, n_features) or (n_samples, n_features)

The learned kernel scaling matrix.

`H_`array-like, shape (n_classes, n_features) or (n_samples, n_features)

The learned kernel bias matrix.

`X_source_`array-like, shape (n_samples, n_features)

The source data.