Open vferat opened 9 months ago
The distance between two vectors should be a linear function
_distance_matrix should be changed from
def _distance_matrix(X, Y=None): """Distance matrix used in metrics.""" distances = np.abs(1 / np.corrcoef(X, Y)) - 1 distances = np.nan_to_num( distances, copy=False, nan=10e300, posinf=1e300, neginf=-1e300 ) return distances
to
def _distance_matrix(X, Y=None): """Distance matrix used in metrics.""" distances = 1 - np.abs(1 / np.corrcoef(X, Y)) return distances
The distance between two vectors should be a linear function
_distance_matrix should be changed from
to