drewwilimitis / hyperbolic-learning

Implemented Machine Learning Algorithms in Hyperbolic Geometry (MDS, K-Means, Support vector machines, etc.)
https://drewwilimitis.github.io/hyperbolic-learning/
126 stars 28 forks source link

minkowski_distance_gradient #3

Open jiwoongpark92 opened 4 years ago

jiwoongpark92 commented 4 years ago

I think

def minkowski_distance_gradient(u, v):

u,v in hyperboloid

# returns gradient with respect to u
return -1*(hyperboloid_dot(u,v) ** 2 - 1) ** -1/2 * v

should be changed into

def minkowski_distance_gradient(u, v):

u,v in hyperboloid

# returns gradient with respect to u
return -1*(hyperboloid_dot(u,v) ** 2 - 1) ** (-1/2) * v

However, I cannot obtain clustering results when I changed the above function.