skojaku / matrix-weight-net

MIT License
1 stars 0 forks source link

Consensus dynamics figure #5

Closed skojaku closed 1 month ago

skojaku commented 1 month ago

Figure generated.

skojaku commented 1 month ago

https://github.com/skojaku/matrix-weight-net/tree/consensus-dynamics-figure/notebooks/2024-09-17-sk-sbm-exp/figs

skojaku commented 1 month ago
Screenshot 2024-09-18 at 6 35 33 AM

(This is the first version. Refinement will be followed)

skojaku commented 1 month ago

With noise (same parameters used in the Yu's experiment)

Screenshot 2024-09-18 at 6 36 44 AM
skojaku commented 1 month ago

Ring of 3 communities

Screenshot 2024-09-18 at 10 16 47 AM
skojaku commented 1 month ago

Update

I now incorporated the Yu's suggestions, namely

  1. A random rotation matrix R is generated
  2. Edges between communities (l, k) have rotation matrix R^{|l-k|} and its transpose.

This ensures the coherence. All results are here: https://github.com/skojaku/matrix-weight-net/tree/consensus-dynamics-figure/notebooks/2024-09-17-sk-sbm-exp/figs

skojaku commented 1 month ago

Without noise, the numerical results match with the theoretical ones for two and three community cases 😉

(n_nodes\~90-n_communities\~3-dim\~3-pin\~0.3-pout\~0.3-noise\~0-coherence\~1)

Screenshot 2024-09-19 at 9 49 51 AM
skojaku commented 1 month ago

The results are robust to the choice of the dimensions.

Here is the result for the 10 dimensional space. I get the same results for the case of two dimensions.

(n_nodes\~90-n_communities\~3-dim\~10-pin\~0.3-pout\~0.3-noise\~0-coherence\~1)

Screenshot 2024-09-19 at 9 51 26 AM
skojaku commented 1 month ago

When the angles have stochastic variations, the states converge to the origin, which is in line with the Yu's results.

Screenshot 2024-09-19 at 10 00 41 AM
skojaku commented 1 month ago

A result for (p_in, p_out) = (0.3, 0.1): with noise

https://github.com/skojaku/matrix-weight-net/blob/consensus-dynamics-figure/notebooks/2024-09-17-sk-sbm-exp/figs/cons-dyn-n_nodes~90-n_communities~3-dim~10-pin~0.3-pout~0.1-noise~0.1-coherence~0.8.pdf

A result for (p_in, p_out) = (0.3, 0.1): without noise

https://github.com/skojaku/matrix-weight-net/blob/consensus-dynamics-figure/notebooks/2024-09-17-sk-sbm-exp/figs/cons-dyn-n_nodes~90-n_communities~3-dim~10-pin~0.3-pout~0.1-noise~0-coherence~1.pdf

skojaku commented 1 month ago

On how to find the result with a specific parameter set:

The url to the figure is in the following format.

https://github.com/..../figs/cons-dyn-n_nodes~{n_nodes}-n_communities~{n_communities}-dim~{n_communities}-pin~{pin}-pout~{pout}-noise~{noise}-coherence~{coherence}.pdf

where {...} is a placeholder for the parameters.

For example,

https://github.com/skojaku/matrix-weight-net/blob/consensus-dynamics-figure/notebooks/2024-09-17-sk-sbm-exp/figs/cons-dyn-n_nodes~90-n_communities~3-dim~10-pin~0.3-pout~0.1-noise~0-coherence~1.pdf

points to the result for the following configuration:

skojaku commented 1 month ago