Hi Nic,
I think you are totally right, from a first look it seems that those lines should read instead:
mnet_d_1=mean(x{1},1)-mean(x0{1}{2},1); %title('Difference with
lattice')
mnet_d_2=mean(x{2},1)-mean(x0{2}{1},1);
%title('Difference with random');
I will take a closer look and let you know but very good catch and thanks a lot for the help!!
Alfonso
Originally posted by Nicolas Deom:
Hi all,
I believe there is an issue in the code of the conn_network.m function which calculates and plots global efficiency and local efficiency at different threshold ranges and compares with a lattice and random network to help with the decision of picking a cost threshold. I think that the numbers are correct for the first two plots, the problem is in the last one, which shows the optimization for small-world network properties. In the script for the conn_network function, on lines 136 to 138, where the values seem to be calculated for this plot, lines 136 and 137 both use the variable 'mnet_d' which has its value set to local efficiency data at the end of the previous loop (lines 112 to 134). This means that the graph actually plots LE_{data}-GE_{lattice}+LE_{data}-LE_{random} instead of the intended GE_{data}-GE_{lattice}+LE_{data}-LE_{random}. Looking at the numbers from my data seems to confirm this when trying to manually calculate the values in the graph: using the expected formula does not exactly align, while the unintended formula does.
In light of this, I have two questions:
- Am I reading and understanding the script correctly? Is there indeed an error there?
- What are the implications for work carried out that used a threshold range based on the incorrect formula? Has it been optimized for a basically meaningless value and is therefore uninterpretable, particularly if the threshold selected based on the two versions of the formula widely differ?
Thanks for your help!
Nic
Threaded View
| Title | Author | Date |
|---|---|---|
| Nicolas Deom | Aug 25, 2026 | |
| Alfonso Nieto-Castanon | Sep 1, 2026 | |
| Alfonso Nieto-Castanon | 14 hours ago | |
| Nicolas Deom | 11 hours ago | |
