Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

analyze_landscape fails #345

Closed
azazellochg opened this issue Feb 2, 2024 · 1 comment
Closed

analyze_landscape fails #345

azazellochg opened this issue Feb 2, 2024 · 1 comment

Comments

@azazellochg
Copy link

cryodrgn 3.1.0 beta from github

analyze_landscape raises an unexpected kwarg ("affinity") exception. The fix below seems to work:

diff --git a/cryodrgn/commands/analyze_landscape.py b/cryodrgn/commands/analyze_landscape.py
index f14cbd5..64ab60b 100644
--- a/cryodrgn/commands/analyze_landscape.py
+++ b/cryodrgn/commands/analyze_landscape.py
@@ -329,7 +329,7 @@ def analyze_volumes(
if not os.path.exists(subdir):
os.makedirs(subdir)
cluster = AgglomerativeClustering(
-        n_clusters=M, affinity="euclidean", linkage=linkage
+        n_clusters=M, linkage=linkage
)
labels = cluster.fit_predict(vols)
utils.save_pkl(labels, f"{subdir}/state_labels.pkl")
@michal-g
Copy link
Collaborator

michal-g commented Feb 2, 2024

Thanks, we just came across this bug as well and will be addressing it in 3.2.0-beta — d18522c has the same fix as above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants