Skip to content

Commit

Permalink
requirements.txt update and attribute name change (#152)
Browse files Browse the repository at this point in the history
* edit requirements.txt to match INSTALL_REQUIRES from setup.py

* changed 'affinity' parameter to 'metric' to follow sklearn.cluster.AgglomerativeClustering parameter rename

---------

Co-authored-by: BARRAY Sven <id1951@DOMENSAI.ECOLE>
  • Loading branch information
SvenBarray and BARRAY Sven committed Jun 20, 2023
1 parent 3d649d6 commit 36b8ca1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/clustering/plot_dtw_boss.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def plot_dendrogram(model, **kwargs):
fig, axes = plt.subplots(1, 3, figsize=(16, 8))

X, y = make_cylinder_bell_funnel(n_samples=n_samples, random_state=42,
shuffle=False)
shuffle=False)
for k_axis, metric in enumerate(["Euclidean", "DTW", "BOSS"]):
if metric == "DTW":
dist_mat = create_dist_matrix(X, dtw)
Expand All @@ -89,7 +89,7 @@ def plot_dendrogram(model, **kwargs):

model = AgglomerativeClustering(compute_full_tree=True,
compute_distances=True,
n_clusters=3, affinity="precomputed",
n_clusters=3, metric="precomputed",
linkage="complete")
cluster = model.fit_predict(dist_mat)
score = round(homogeneity_score(labels_true=y, labels_pred=cluster), 2)
Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy>=1.17.5
scipy>=1.3.3
scikit-learn>=0.22.1
joblib>=0.14
numba>=0.48.0
numpy>=1.22.4
scipy>=1.8.1
scikit-learn>1.2.0
joblib>=1.1.1
numba>=0.55.2

0 comments on commit 36b8ca1

Please sign in to comment.