Commit b4b8e9e
committed
refactor: sklearn-style class API for clustering methods
Each clustering algorithm is now a frozen dataclass configured at
construction time and invoked as a callable:
result = Gromos(cutoff_nm=0.2)(rmsd_matrix)
result = DBSCAN(eps=0.15, backend="numba")(rmsd_matrix)
result = KMeans(n_clusters=10)(pca.projections)
Distance-matrix methods: Gromos, Hierarchical, DBSCAN, HDBSCAN
Feature-vector methods: KMeans, MiniBatchKMeans, RegularSpace
DBSCAN supports backend="numba" (default, O(n) aux) and
backend="sklearn" (official). Other methods delegate to their
official library (scipy/sklearn/deeptime).
cluster_conformations and cluster_features remain as backward-
compatible wrappers accepting both string names and class instances.
Removed all memory guards per user request.1 parent de3743f commit b4b8e9e
3 files changed
Lines changed: 454 additions & 305 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
4 | 11 | | |
5 | 12 | | |
6 | 13 | | |
| |||
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
34 | 48 | | |
35 | 49 | | |
36 | 50 | | |
| |||
0 commit comments