spectralbrain.wesd#
- spectralbrain.wesd(dna_a, dna_b, *, p=2.0, normalize=True)[source]#
Weighted Spectral Distance between two ShapeDNA vectors.
A pseudometric with convergence guarantees — the series converges for p > d/2 where d is the dimension of the manifold (d = 2 for surfaces, so p > 1 suffices).
\[\text{WESD}^p(\Omega_1, \Omega_2) = \left( \sum_{i=1}^{k} \frac{|\lambda_i^{(1)} - \lambda_i^{(2)}|} {\lambda_i^{(1)} \cdot \lambda_i^{(2)}} \right)^{1/p}\]- Parameters:
- Returns:
float – WESD distance.
- Return type:
References
Konukoglu E, Glocker B, Criminisi A, Pohl KM. WESD — Weighted Spectral Distance for measuring shape dissimilarity. IEEE TPAMI 35(9):2284–2297, 2013.