-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Hi! Thanks for you work with the package. I'm currently trying to understand the implementation of DisSim, which seems to differ from the paper. If idx and dist contain the indices and distances to the n-1 neighbors, equation 8 from the paper would be something like:
def dissim(x, idx, dist):
centroids = x[idx].mean(axis=1)
dist_x, dist_y = x - centroids, x[idx] - centroids[idx]
norm_dist_x = np.einsum("ij,ij -> i", dist_x, dist_x)[:,np.newaxis]
norm_dist_y = np.einsum("ijk,ijk -> ij", dist_y, dist_y)
return dist - np.sqrt(norm_dist_x) - np.sqrt(norm_dist_y)The implemented version returns something like np.sqrt(dist - norm_dist_x - norm_dist_y), where the norms are generated slightly differently. Is this intended and only a documentation problem?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels