annoviko / annoviko/pyclustering
Better PAM initialization with BUILD
- Langage dominant
- Python
- Étoiles
- 1.2k
- Forks
- 262
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
The PAM/k-medoids implementation appears to implement SWAP, but not the BUILD part for initializing PAM. Instead you have to provide good starting medoids.
I tired benchmarking it on a larger data set (well-known 20news data set in the `sklearn.datasets.fetch_20newsgroups_vectorized` version; with cosine distance and k=20) and the runtime of pyclustering kmedoids was extremely high (2000 sec), likely because of the poor random initialization.
With BUILD from the `kmedoids` package, I can reduce the run time to 338 sec. Nevertheless, `pam` from `kmedoids` is just 37 seconds, including 4.6 seconds for BUILD. The `fasterpam` variant finishes in 336 msec with random initialization.
It would also be good to get access to the final loss after optimization as well as the number of iterations. Then I could check if it ran into the maximum iteration limit, and if at least the result quality is comparable.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.