Skip to content

Commit

Permalink
Change distance computation
Browse files Browse the repository at this point in the history
  • Loading branch information
vferat committed May 12, 2024
1 parent 119d379 commit 8df8985
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pycrostates/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,11 @@ def _corr_vectors(A, B, axis=0):
np.seterr(divide="warn", invalid="warn")
return corr


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
)
distances = 1 - np.abs(1 / np.corrcoef(X, Y))
return distances


def _compare_infos(cluster_info, inst_info):
"""Check that channels in cluster_info are all present in inst_info."""
for ch in cluster_info["ch_names"]:
Expand Down

0 comments on commit 8df8985

Please sign in to comment.