work on optimal cas metric to fix clustering coefficient 03-21-2014d1524

2014-08-29

work on optimal cas metric to fix clustering coefficient 03-21-2014d1524


Quick look at networks

03-21-2014d1422

need to fix clustering coefficient calculation

all_three_neighbors_connected

my code calculates a clustering coefficient of 0.8333
for
C:\\Users\\kurtw_000\\Documents\\kurt\\storage\\DR\\2014\\03-11-2014d1439\\network_test\\2_neighbors_connected.txt
and Cytoscape calculates
  1. 833

I need to fix this.

What do I get if I do the calculation by hand?
  1. 83333

"C:\Users\kurtw_000\Documents\kurt\storage\DR\2014\03-11-2014d1439\network_test\6 node test.txt"

With the 6 node test my code gives a different answer than cytoscape.
my program: 0.6333
cytoscape: 0.528

What was the 5 node test?
my program: 0.7666666666666666
cytoscape: 0.767

(0.7666666666666666+0)/2 = 0.383
(0.7666666666666666+-1)/2 = -0.1167
(0.7666666666666666+1)/2 = 0.883

y/5=0.7666666666666666
y=3.83333333333333



It seems like my code should give 0.7666



local clustering coefficients with 5 node network
0.5, 0.6666666666666666, 0.6666666666666666, 1.0, 1.0

local clustering coefficients with 6 node network
0.5, 0.6666666666666666, 0.6666666666666666, 1.0, NaN, 0.3333333333333333


I found the problem with my clustering coefficient code! I was removing local clustering coefficients of nodes with just one neighbor, but I should have set these clustering coefficients to 0.

Now I get the correct value of 0.080 for the power grid.

For the euroroad I get
  1. 01673156