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?
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
idxanddistcontain the indices and distances to then-1neighbors, equation 8 from the paper would be something like: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?