Skip to content

Commit

Permalink
Rename deprecated keyword to
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakshidaa committed Jan 23, 2024
1 parent 21455ad commit 2182894
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions route_distances/clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def fixed_clustering(self, n_clusters: int, **kwargs: Any) -> np.ndarray:
"""
if "linkage" not in kwargs:
kwargs["linkage"] = "single"
kwargs["affinity"] = "precomputed"
kwargs["metric"] = "precomputed"
kwargs["n_clusters"] = n_clusters
model = AgglomerativeClustering(**kwargs)
model.fit(self._distances)
Expand All @@ -59,7 +59,7 @@ def linkage_matrix(self, **kwargs: Any) -> np.ndarray:
"""
if "linkage" not in kwargs:
kwargs["linkage"] = "single"
kwargs["affinity"] = "precomputed"
kwargs["metric"] = "precomputed"
kwargs["n_clusters"] = None
kwargs["distance_threshold"] = 0.0
model = AgglomerativeClustering(**kwargs)
Expand Down

0 comments on commit 2182894

Please sign in to comment.