Skip to content
New issue

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

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

Already on GitHub? # to your account

Clustering sometimes crashes JPlag #1247

Open
uuqjz opened this issue Aug 18, 2023 · 3 comments
Open

Clustering sometimes crashes JPlag #1247

uuqjz opened this issue Aug 18, 2023 · 3 comments
Labels
bug Issue/PR that involves a bug help wanted Feel free to give us a hand! Contributions welcome! minor Minor issue/feature/contribution/change

Comments

@uuqjz
Copy link
Contributor

uuqjz commented Aug 18, 2023

The default clustering method of JPlag is SpectralClustering, which uses org.apache.commons.math3.linear.EigenDecomposition for the eigenvalue decomposition.

EigenDecomposition has a hard-coded limit for the number of iterations until the algorithm must converge or it throws an unhandled MaxCountExceededException.
The limit is set to 30 and as a private field without a setter cannot be changed:
private byte maxIter = 30;

This results in JPlag sometimes crashing when the eigenvalue decomposition doesn't converge.

@tsaglam
Copy link
Member

tsaglam commented Aug 18, 2023

Right now, this only occurs when using match merging, right?

@tsaglam tsaglam added bug Issue/PR that involves a bug minor Minor issue/feature/contribution/change labels Aug 18, 2023
@uuqjz
Copy link
Contributor Author

uuqjz commented Aug 18, 2023

Right now, this only occurs when using match merging, right?

Yes, I only noticed it when using match merging

@tsaglam tsaglam added the help wanted Feel free to give us a hand! Contributions welcome! label Oct 4, 2023
@SimDing
Copy link
Contributor

SimDing commented Dec 11, 2023

When I implemented the spectral clustering I thought that the eigendecomposition should always work on real symmetric matrices (Spectral Theorem), and the Laplacian matrix in SpectralClustering.java is symmetric by construction. Therefore I did not catch that exception...
I can not reproduce this. Maybe numerical errors cause this? We could try to set very small entries in the Laplacian to zero. Like any value $x$ with $|x| < eps * ||L||_F /n^2$.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Issue/PR that involves a bug help wanted Feel free to give us a hand! Contributions welcome! minor Minor issue/feature/contribution/change
Projects
None yet
Development

No branches or pull requests

3 participants