You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now, the "disconnected graph" test for the Fiedler vector / value computation is skipped. The reason for this is that the TRACEMIN solver we use will fail in the event that the Laplacian is not full rank (after accounting for the all-ones vector). We'd like the solver to do the right thing in this case, i.e. return λ₂(L) = 0, along with an eigenvector v ⟂ 1 s.t. v ∈ ker(L).
The goal would be to fix this and re-enable the "disconnected graph" test in test_fiedler.py. Bonus: add a check on the Fiedler vectors.
Possible implementation
I think fixing this should be relatively straightforward - just add a custom TRACEMIN solver to better handle this. A naive solution would be to add some regularization to the anchored Laplacian that gets built inside the solver, e.g. as M = L + reg * I, then compute λ₂(L) = λ₂(M) - reg along with a corresponding eigenvector.
If λ₂(L) = 0, then we just have to return any eigenvector in {v | v ∈ ker(L), v ⟂ 1}. (This could occur, for example, if the corresponding graph had more than 2 connected components).
There are interesting potential performance considerations here, I think. It might be better to attempt to solve for the Fiedler value and vector without this regularization, then catch the internal linear system solver exception and fall back to the regularized version?
The text was updated successfully, but these errors were encountered:
Summary
For now, the "disconnected graph" test for the Fiedler vector / value computation is skipped. The reason for this is that the TRACEMIN solver we use will fail in the event that the Laplacian is not full rank (after accounting for the all-ones vector). We'd like the solver to do the right thing in this case, i.e. return
λ₂(L) = 0
, along with an eigenvectorv ⟂ 1
s.t.v ∈ ker(L)
.The goal would be to fix this and re-enable the "disconnected graph" test in
test_fiedler.py
. Bonus: add a check on the Fiedler vectors.Possible implementation
I think fixing this should be relatively straightforward - just add a custom TRACEMIN solver to better handle this. A naive solution would be to add some regularization to the anchored Laplacian that gets built inside the solver, e.g. as
M = L + reg * I
, then computeλ₂(L) = λ₂(M) - reg
along with a corresponding eigenvector.If
λ₂(L) = 0
, then we just have to return any eigenvector in{v | v ∈ ker(L), v ⟂ 1}
. (This could occur, for example, if the corresponding graph had more than 2 connected components).There are interesting potential performance considerations here, I think. It might be better to attempt to solve for the Fiedler value and vector without this regularization, then catch the internal linear system solver exception and fall back to the regularized version?
The text was updated successfully, but these errors were encountered: