TDA metrics and kernels

This commit is contained in:
Dimitri Lozeve 2018-07-26 11:11:23 +01:00
parent 057df1abea
commit 9faf5accb5
3 changed files with 124 additions and 30 deletions

View file

@ -33,4 +33,4 @@ def SW_approx(dgm1, dgm2, M):
# l1-distance between the projections
SW = SW + s * np.sum(np.abs(V1 - V2))
theta = theta + s
return SW / M
return 1/np.pi * SW