adapt.metrics.normalized_linear_discrepancy

adapt.metrics.normalized_linear_discrepancy(Xs, Xt, power_method=False, n_iter=20)[source]

Compute the normalized linear discrepancy between Xs and Xt.

Xs and Xt are first scaled by a factor (std(Xs) + std(Xt)) / 2 and centered around (mean(Xs) + mean(Xt)) / 2

Then, the linear discrepancy is computed and divided by the number of features.

Parameters
Xsarray

Source array

Xtarray

Target array

Returns
scorefloat

References

1

[1] Y. Mansour, M. Mohri, and A. Rostamizadeh. “Domain adaptation: Learning bounds and algorithms”. In COLT, 2009.