Skip to content

Instantly share code, notes, and snippets.

@rjurney
Created July 6, 2023 06:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rjurney/91d6b5408da9ec2e97e1760f76d5b346 to your computer and use it in GitHub Desktop.
Save rjurney/91d6b5408da9ec2e97e1760f76d5b346 to your computer and use it in GitHub Desktop.
What is wrong with this Markdown? Why won't Jupyter parse it?

Assortativity

Assortativity in networks refers to a correlation pattern observed in real-world networks where nodes are preferentially connected to other nodes that are like (or unlike) them in some way. This is essentially a bias in connection preference.

--ChatGPT4

A related term is assortative mixing:

In the study of complex networks, assortative mixing, or assortativity, is a bias in favor of connections between network nodes with similar characteristics. In the specific case of social networks, assortative mixing is also known as homophily. The rarer disassortative mixing is a bias in favor of connections between dissimilar nodes.

--Wikipedia, Assortative Mixing

This can be summarized via the assortativity coefficient.

The assortativity coefficient is the Pearson correlation coefficient of degree between pairs of linked nodes.

--Wikipedia, Assortativity

Pearson's is the covariance of two distributions divided by the product of their standard deviations. Assortativity adapts it for pairs of nodes while accounting for the degree of each node.

Equation for Pearson's Correlation Coefficient

Computing Degree Assortativity

One type of assortativity is degree assortativity, which measures to what extent nodes connect to other nodes with similar degrees.

It ranges from -1 to 1. We will use the NetworkX API nx.algorithms.assortativity.degree_assortativity_coefficient to compute it.

Results

The value for degree assortativity we compute below of 0.00172 indicates that overall nodes often associate with similar or dissimilar nodes by degree in roughly equal proportions. There is no correlation between the degree of nodes and their tendency to connect.

In a citation network, a higher assortativity can mean that papers with many citations (high degree nodes) tend to cite other papers with many citations. This could reflect a phenomenon where "popular" or foundational papers are often cited together. A lower assortativity might suggest that highly-cited papers are citing less-cited papers, indicating a wider dispersion of references and potentially more novel research that builds on less well-known work.

--ChatGPT4 and Russell Jurney

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment