Friday, May 22, 2009

Degree Distribution

I've begun some preliminary work on developing some of the metrics for this project. I've realized that the actual metrics will not be hard, but the integration, display and parametrization will be challenging. As I mentioned last time we've chosen JFreeChart for display purposes. I've coded up a Least-Squares fit for the degree distribution metric.

Scale free networks are those in which the degree distribution of the network follows a power-law (sometimes called the 80-20 law) which means that there are very few nodes with very high-degree and very few nodes with small degree. When we look at the the logarithm of the degree distribution we expect to see a straight-line (more or less) for scale free networks.

I'd like to see if there is any advantage to threading this model when it comes to large networks... java is pretty easy to add threads to. The run time of the algorithm probably isn't that bad when compared to the other metrics.


Possible user parameters:
1) Separate into in and out degree or combined. (The below is combined)
2) Least-Squares or other method for computing alpha value.
3) Display logarithm or non-logarithm.


This chart is from the Jazz Musicians social network with < 200 nodes. The axises below are logarithmic.




I've also coded some of the clustering coefficient, both the standard method and the triangles approach from Dr. Lattapy. There is some small error still in the triangles version that I must hunt down as the two are disagreeing slightly (1%). The current version is really only for undirected so this should be changed as well.

1 comment:

  1. I found my mistake in the triangles version. I added threading to the algorithm and accidentally calculated the values for one of the nodes twice... I knew it was something small, just wish I didn't spend two hours finding it.

    ReplyDelete