adapt.metrics.frechet_distance
- adapt.metrics.frechet_distance(Xs, Xt)[source]
Compute the frechet distance between Xs and Xt.
\[\Delta = ||\mu_S - \mu_T||_2^2 + Tr\left(\Sigma_S + \Sigma_T - 2 (\Sigma_S \cdot \Sigma_T)^{\frac{1}{2}} \right)\]Where:
\(\mu_S, \mu_T\) are the mean of Xs, Xt along first axis.
\(\Sigma_S, \Sigma_T\) are the covariance matrix of Xs, Xt.
- Parameters
- Xsarray
Source array
- Xtarray
Target array
- Returns
- scorefloat
References
- 1
[1] Dowson, D. C; Landau, B. V. “The Fréchet distance between multivariate normal distributions”. JMVA. 1982