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 errorby inversing the role of the source and the target domains.A clone of the model is trained to adapt from the target tothe source using the model target predictions aspseudo target labels. Then the final score is computed betweenthe 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
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.