adapt.metrics.reverse_validation

adapt.metrics.reverse_validation(model, Xs, ys, Xt, **fit_params)[source]

Reverse validation.

The reverse validation score is computed as a source error by inversing the role of the source and the target domains. A clone of the model is trained to adapt from the target to the source using the model target predictions as pseudo target labels. Then the final score is computed between the source prediction of the cloned model and the groundtruth.

Parameters
modelBaseAdapt instance

Adaptation model

Xsarray

Source input array

ysarray

Source output array

Xtarray

Target input array

fit_paramskey, value arguments

Parameters for the fit method of the cloned model.

Returns
scorefloat

See also

domain_classifier
DANN

References

1

[1] Y. Ganin, E. Ustinova, H. Ajakan, P. Germain, H. Larochelle, F. Laviolette, M. Marchand, and V. Lempitsky. “Domain-adversarial training of neural networks”. In JMLR, 2016.