UBod / apcluster

R package implementing affinity propagation clustering along with various utilities
https://github.com/UBod/apcluster
9 stars 8 forks source link

algorithm did not converge #5

Closed darked89 closed 1 year ago

darked89 commented 2 years ago

I am using apcluster for clustering 21k items for which I already have a precomputed similarity matrix.

The issue:

changing apcluster() parameters even to convits=1000, lam=0.75 maxits=5000 does not get rid of the "algorithm did not converge" warnings. Increasing lam to 0.9 also did not made any change.

clust_result <- apcluster(matrix_sim, details=TRUE, maxits=5000, lam=0.9)

Question

Is this something to seriously worry about, so I should try to tweak parameters even more, or it is something not crucial? In the plot(clust_result) the lines go flat rather fast (after 100 iterations or so).

Thank yo for your help

Darek Kedra

UBod commented 2 years ago

I cannot diagnose this issue precisely without having the data set. I would suggest the following: lower convits and possibly increase maxits. In any case, clustering 21K items with regular affinity propagation seems like a hard task and probably takes quite long. Have you tried apclusterL() instead?

darked89 commented 2 years ago

Thank you for the prompt and helpful answer.

re 21k clustering: with precomputed similarity matrix it takes ca 5hrs with 5000 maxits on Ryzen 7 5800x using 25-28G RAM. OK if it works, but certainly inconvenient if one wants to optimize the parameters. I will try apclusterL() for sure.

DK