Open mys007 opened 7 years ago
Thanks for reporting the issue. Note however that this toolbox is not developed nor maintained anymore. Please consider using the pygsp instead.
Thanks for your reply! When/if I come back to Kron reduction again, I will definitely use the new Python toolbox (looks very nice, great work) and I will check if my two issues are still relevant there.
Thanks :) I think they'll be relevant, though I did not touch the graph multiresolution code (it was initially translated from matlab by interns). Please submit a PR if you come across them again.
I think the behavior on L141 in
gsp_graph_multiresolution.m
is wrong in the case whenlargest_eigenvector(1)==0
, which now leads to fillinglargest_eigenvector
with 0s assign(0)=0
. I suggest L141 being executed only iflargest_eigenvector(1)~=0
. Also, as eig works up toeps
precision, one should IMHO havenonnegative_logicals=(largest_eigenvector >= -eps);
instead ofnonnegative_logicals=(largest_eigenvector >= 0);
, as the current may lead to problems with graphs with multiple connected components, which are then numerically not properly identified to be kept, which may lead to NaNs in Kron reduction.