Measure how similar connected nodes are in networks. Reveal mixing patterns in physical systems. Use results to refine models and validate simulations accurately.
| Edge | Meaning | Sample attribute |
|---|---|---|
| A — B | Connection between nodes A and B | A: 1.0, B: 0.6 |
| A — C | Connection between nodes A and C | A: 1.0, C: 1.2 |
| C — D | Connection between nodes C and D | C: 1.2, D: 0.9 |
| D — E | Connection between nodes D and E | D: 0.9, E: 1.1 |
Try switching between degree and attribute modes to see how the coefficient changes.
The assortativity coefficient measures correlation between endpoint properties across edges. For numeric properties (including degrees), it is computed as a Pearson correlation:
r = ( ⟨xy⟩ − ⟨x⟩⟨y⟩ ) / √( (⟨x²⟩ − ⟨x⟩²)(⟨y²⟩ − ⟨y⟩²) )
Tip: If r is positive, similar nodes preferentially connect; if negative, dissimilar nodes connect more often.
Assortativity quantifies whether connected nodes share similar properties. In many physics-inspired networks, nodes represent components, states, or sites, while edges represent interactions, transport channels, or correlations. The coefficient r ranges from -1 (perfectly disassortative) to +1 (perfectly assortative), with values near 0 indicating weak mixing.
In scale‑free or heterogeneous graphs, degree assortativity helps reveal whether hubs attach to hubs (positive) or hubs attach to low‑degree nodes (negative). Physical examples include flow networks, contact networks, and interaction graphs from simulations. This tool reports nodes, edges, average degree, and density to provide context for your computed correlation.
For undirected graphs, many studies use excess degree (degree − 1) because an edge already “uses” one connection. Excess degree reduces a structural bias when comparing networks of different sizes. Try toggling “Use excess degree” and observe how r shifts for sparse graphs.
Directed graphs arise in transport, reaction pathways, and causal models. This calculator supports four pairings: out→in, out→out, in→in, and in→out. Choose the pairing that matches your mechanism, such as source activity connecting to target receptivity (out→in) in driven systems.
When nodes carry measurements (energy, mass, conductivity, temperature proxies, or order parameters), numeric assortativity measures the Pearson correlation between endpoint values across edges. A positive r suggests spatial or interaction clustering of similar magnitudes, often linked to phase separation or domain formation in lattice‑like models.
For labels such as material type, spin state, compartment, or class, categorical assortativity uses a mixing matrix. The method compares the observed fraction of within‑category edges to what would be expected from the category frequencies. Strong within‑class preference drives r upward.
In applied analysis, |r| below 0.1 is often described as weak, while values around 0.2–0.4 can indicate meaningful structure, depending on noise and sampling. Always report the network size, density, and attribute coverage. This tool shows how many edges were used when attributes are required, helping you diagnose missing data.
Use assortativity as a comparative metric: compare experimental vs simulated networks, or compare states across temperatures, driving strengths, or time windows. Export CSV for record‑keeping and use the PDF report for lab notes. If variance is near zero, the calculator warns because correlation becomes unstable.
A value near 0.30 indicates moderate positive mixing: connected nodes tend to have similar degrees or attribute values. It often suggests clustering of similar states, especially when density is low and attributes cover most nodes.
If no valid edge‑pairs exist, the calculator cannot compute correlation. Common causes are empty edge lists, malformed lines, or missing attributes on one endpoint for attribute modes. Check the parsed edge count and edges used.
Use excess degree for undirected degree mixing when you want to compare networks fairly across sizes or sparsity. It reduces bias because an endpoint already participates in the edge being analyzed, so degree − 1 is often preferred.
Pick the pairing that matches your mechanism. Out→in fits “source drives target” processes, out→out compares emitter activity, and in→in compares receptivity. If unsure, compute all four and report the pattern differences.
If many nodes share the same degree or identical attribute values, variance becomes near zero. Pearson correlation then becomes unstable or uninformative. Increase network size, use richer attributes, or verify your data variation.
In theory, r lies within −1 and +1. Small numerical rounding can slightly exceed bounds, so this calculator clamps results into the valid range. Large deviations usually indicate invalid inputs or a computation mismatch.
More is better. For stable estimates, aim for dozens of edges at minimum and preferably hundreds, especially with noisy attributes. Also ensure good attribute coverage; the tool reports edges used so you can judge sampling quality.