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

Some normalized_cut() fixes #84

Merged
merged 6 commits into from
Sep 14, 2023
Merged

Conversation

alyst
Copy link
Contributor

@alyst alyst commented Dec 24, 2021

Fixes a few issues I have encountered when running normalized_cut():

  • sometimes eigs() returns less eigenvectors than requested, even less than 2. In the latter case the algorithm now would put all vertices to separate modules instead of throwing OutOfBounds exception.
  • isolated or nearly isolated vertices result in degenerated W matrix and zeros on the D diagonal. Now the algorithm would check for that, put the corresponding vertices to separate modules and continue cutting with these vertices excluded (instead of throwing exception upon inv(D)). (Such situations should have been handled by the generalized eigs(), but it is not implemented in ArnoldiMethod.jl, and IIUC using Arpack.jl is problematic).
  • some cleanups to eigs() (handling real and complex cases uniformly)

@codecov
Copy link

codecov bot commented Jan 9, 2022

Codecov Report

Merging #84 (17f7023) into master (d25e5d7) will decrease coverage by 0.06%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
- Coverage   97.30%   97.25%   -0.06%     
==========================================
  Files         115      115              
  Lines        6764     6768       +4     
==========================================
  Hits         6582     6582              
- Misses        182      186       +4     

@etiennedeg
Copy link
Member

Is someone able to review this ? It seems good to me, but I'm not very knowledgeable in spectral graph theory

@gdalle gdalle added the bug Something isn't working label Jun 16, 2023
@gdalle gdalle added this to the v1.9 milestone Jun 28, 2023
Copy link
Member

@gdalle gdalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the algorithm in detail but the changes are coherent with the PR description and they look good to me

@gdalle gdalle merged commit fd9f90a into JuliaGraphs:master Sep 14, 2023
8 of 12 checks passed
@simonschoelly simonschoelly mentioned this pull request Sep 20, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants