-
Notifications
You must be signed in to change notification settings - Fork 182
Assortativity #275
Assortativity #275
Conversation
Current coverage is
|
fixes to methods first assortativity to pass tests
formulas are wrong does not pass tests.
|
Is the plan to fix the tests? |
| http://arxiv.org/abs/cond-mat/0209450 | ||
| """ | ||
| function assortativity_coefficient(g::DiGraph, sjk, ssj, sk, sjs, sks, nue) | ||
| return res = (sjk - sj*sk/nue)/sqrt((sjs - sj^2/nue)*(sks - sk^2/nue)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These parameters need types.
|
We shouldn't merge it until the math errors are resolved. @akarpf have you resolved the math errors? |
|
It needs a more in-depth review as well... I've just skimmed so far. |
|
@sbromberger Sorry, I was extremely busy recently as I am currently commuting between two different cities. @jpfairbanks Can you hint me to the maths errors? I was actually double-checking it with the igraph functions. Trying to do all that on the weekend. |
|
If you look at this file, https://github.com/JuliaGraphs/LightGraphs.jl/blob/assortativity/test/centrality/assortativity.jl it tests that if you look at the path graph on Can create a list of graphs that you can test with both igraph and LightGraphs? |
|
@jpfairbanks In the graph version of the assortativity measure a value of >0 points to assortative mixing (+1 perfect assortativity), while a value < 0 points to disassortative mixing (-1 perfect disassortativty). Of the 0 the graph is non-assortative. The individual level scores are not constrained to be inside [-1,1] but should in sum yield the graph wide measure. |
|
Where is the code that checks against the values produced by igraph? That code should be the basis of the necessary unit tests. |
|
@jpfairbanks Clear, this is what I going to deliver as soon as I find the time. However, once can check for the consistence of the code by summing up the node level assortativity values of an arbitrary graph. This sum should correspond to the graph level result. If not, then I uploaded the wrong code. I am going to check this. |
|
Hi, What's the plan for this PR? |
|
Hey @akarpf, did you find the time to fix things? |
|
@akarpf I more or less fixed it, I however asked you a question with regard to example networks (florentine marriage network etc.) with which I/we can benchmark other libraries like igraph around three weeks ago. |
|
Oh I don't remember that. What was the question? There are example networks in generators.jl and datasets.jl. Generators are graphs that are parameterized usually by a size. and datasets are examples found in the literature. |
|
@jpfairbanks @akarpf - what's the status of this PR? |
|
@akarpf @jpfairbanks we're coming up on 8 months since the PR was originally opened, and 4 months since the last substantive comment. What's the plan? |
|
Closing out due to inactivity. @jpfairbanks - feel free to reopen if you want to keep working on it. |
This PR is a duplicate of #274 covering issues #273 and #273.
We add functions for computing assortativity with respect to degree and categorical labels with nominal and local variations.