cdebacco / SpringRank

Calculates SpringRank from directed networks or pairwise comparisons
MIT License
54 stars 11 forks source link

Ranks for specific Beta & Issues #7

Open edsf70 opened 5 years ago

edsf70 commented 5 years ago

How do we obtain ranks for a specific beta? Thank you very much indeed!!!!

Issues are below:

Error in crossValidation (line 58) idx = shuffle(1:M); Error in demo (line 108) [sig_a,sig_L] = crossValidation(A,5,1);

Error in eigenvectorCentrality (line 5) [V,~] = eigs(A+regularization,1); Error in demo (line 89) s_eig = eigenvectorCentrality(A);

edsf70 commented 5 years ago

Running with MATLAB

dblarremore commented 5 years ago

I just pushed shuffle.m to the repo, so grabbing that file should solve the first problem.

I can't tell what's going on with the second error. Is there more information that you can provide? It appears that there is an error calling the function eigs, but this should be a built-in function. Hmmm. https://www.mathworks.com/help/matlab/ref/eigs.html

About obtaining ranks for a specific beta: the SpringRank ranks are independent of beta, so the question can't be answered, actually. If you prefer, you can think of the ranks as the minimum energy solution, and the beta as being related to the uncertainty around those ranks. When beta is high, certainty is high. When beta is low, certainty is low.

edsf70 commented 5 years ago

Thanks for putting shuffle.m into repo!

About the remaining issue:

This is how function eigenvectorCentrality is defined: function [V] = eigenvectorCentrality(A,regularization)

I think parameter "regularization" should also be included where function is used in demo.m: s_eig = eigenvectorCentrality(A);

Am I misunderstand something? By no means I'm a MATLAB programmer...

And thanks for your explanation about beta!

dblarremore commented 5 years ago

That's exactly right! I've changed s_eig = eigenvectorCentrality(A); to s_eig = eigenvectorCentrality(A,1e-6); in the latest version. Let me know if there are any issues remaining!