Network & Metric Backbone comparison¶

Network: Primary school (results only)¶


Reference: Juliette Stehlé, Nicolas Voirin, Alain Barrat, Ciro Cattuto, Lorenzo Isella, Jean-François Pinton, Marco Quaggiotto, Wouter Van den Broeck, Corinne Régis, Bruno Lina and Philippe Vanhems. PLOS ONE 6(8): e23176 (2011). doi:10.1371/journal.pone.0023176

Original data: http://www.sociopatterns.org/datasets/primary-school-cumulative-networks/

In [2]:
from IPython.core.display import display, Math, Image, HTML, Markdown
import pandas as pd
In [3]:
project = 'primary-school'
normalization = 'social'
In [4]:
display(Image(url='images/{:s}/{:s}/graph_original_metalabels.png'.format(project,normalization), width=600))
In [5]:
display(Markdown('## Modularity in networks with original node position'))
display(Image(url='images/{:s}/{:s}/graph_comparison.png'.format(project,normalization)))

Modularity in networks with original node position¶

In [6]:
display(Markdown('## Modularity in networks with recomputed node position'))
Image(url='images/{:s}/{:s}/graph_comparison_layout.png'.format(project,normalization))

Modularity in networks with recomputed node position¶

Out[6]:

Modules¶

In [7]:
index = ['Meta labels','Louvain']
data = [
    ('11','10','-','-' ,'-'),
    ( '-', '8','9','10','21.15(±2.23)'),
]
pd.DataFrame(data, columns=['Original','Original (no teachers)','Metric','Threshold','Random*'], index=index)
Out[7]:
Original Original (no teachers) Metric Threshold Random*
Meta labels 11 10 - - -
Louvain - 8 9 10 21.15(±2.23)

$h$, $y$, $J$ and $\text{clusim}$ measures¶

In [8]:
display(HTML("""
<table><tr>
    <th colspan="2" rowspan="2">$h_{A \\to B}$ / $h_{B \\to A}$</th>
    <th colspan="4">B</th>
  </tr><tr>
    <td>Original proximity</td>
    <td>Backbone</td>
    <td>Threshold</td>
    <td>Random*</td>
  </tr><tr>
    <th rowspan="2">A</th>
    <td>Meta labels</td>
    <td>0.02/0.10</td>
    <td>0.02/0.05</td>
    <td>0.09/0.09</td>
    <td>0.41(±0.03)/0.25(±0.04)</td>
  </tr><tr>
    <td>Original proximity</td>
    <td>-</td>
    <td>0.10/0.07</td>
    <td>0.14/0.07</td>
    <td>0.44(±0.03)/0.22(±0.04)</td>
  </tr></table>
  <small>* Results on 100 realizations.</small>
"""))
$h_{A \to B}$ / $h_{B \to A}$ B
Original proximity Backbone Threshold Random*
A Meta labels 0.02/0.10 0.02/0.05 0.09/0.09 0.41(±0.03)/0.25(±0.04)
Original proximity - 0.10/0.07 0.14/0.07 0.44(±0.03)/0.22(±0.04)
* Results on 100 realizations.
In [9]:
display(HTML("""
<table><tr>
    <th colspan="2" rowspan="2">$y_{AB}$</th>
    <th colspan="4">B</th>
  </tr><tr>
    <td>Original proximity</td>
    <td>Backbone</td>
    <td>Threshold</td>
    <td>Random*</td>
  </tr><tr>
    <th rowspan="2">A</th>
    <td>Meta labels</td>
    <td>0.875</td>
    <td>0.936</td>
    <td>0.856</td>
    <td>0.53(±0.03)</td>
  </tr><tr>
    <td>Original proximity</td>
    <td>-</td>
    <td>0.8</td>
    <td>0.789</td>
    <td>0.51(±0.03)</td>
  </tr></table>
  <small>* Results on 100 realizations.</small>
"""))
$y_{AB}$ B
Original proximity Backbone Threshold Random*
A Meta labels 0.875 0.936 0.856 0.53(±0.03)
Original proximity - 0.8 0.789 0.51(±0.03)
* Results on 100 realizations.
In [10]:
display(HTML("""
<table><tr>
    <th colspan="2" rowspan="2">$J_{A \\to B}$ / $J_{B \\to A}$</th>
    <th colspan="4">B</th>
  </tr><tr>
    <td>Original proximity</td>
    <td>Backbone</td>
    <td>Threshold</td>
    <td>Random*</td>
  </tr><tr>
    <th rowspan="2">A</th>
    <td>Meta labels</td>
    <td>0.78/0.85</td>
    <td>0.88/0.93</td>
    <td>0.79/0.79</td>
    <td>0.42(±0.05)/0.28(±0.03)</td>
  </tr><tr>
    <td>Original proximity</td>
    <td>-</td>
    <td>0.72/0.69</td>
    <td>0.73/0.66</td>
    <td>0.42(±5.36e-02)/0.25(±3.22e-02)</td>
  </tr></table>
  <small>* Results on 100 realizations.</small>
"""))
$J_{A \to B}$ / $J_{B \to A}$ B
Original proximity Backbone Threshold Random*
A Meta labels 0.78/0.85 0.88/0.93 0.79/0.79 0.42(±0.05)/0.28(±0.03)
Original proximity - 0.72/0.69 0.73/0.66 0.42(±5.36e-02)/0.25(±3.22e-02)
* Results on 100 realizations.
In [11]:
display(HTML("""
<table><tr>
    <th colspan="2" rowspan="2">$\\text{clusim}_{AB}$</th>
    <th colspan="4">B</th>
  </tr><tr>
    <td>Original proximity</td>
    <td>Backbone</td>
    <td>Threshold</td>
    <td>Random*</td>
  </tr><tr>
    <th rowspan="2">A</th>
    <td>Meta labels</td>
    <td>0.77</td>
    <td>0.88</td>
    <td>0.78</td>
    <td>0.35(±0.04)</td>
  </tr><tr>
    <td>Original proximity</td>
    <td>-</td>
    <td>0.66</td>
    <td>0.67</td>
    <td>0.33(±0.05)</td>
  </tr></table>
  <small>* Results on 100 realizations.</small>
"""))
$\text{clusim}_{AB}$ B
Original proximity Backbone Threshold Random*
A Meta labels 0.77 0.88 0.78 0.35(±0.04)
Original proximity - 0.66 0.67 0.33(±0.05)
* Results on 100 realizations.
In [21]:
display(Markdown('## Modularity Quality'))
display(Markdown('## Metric Backbone'))
display(Image(url='images/{:s}/{:s}/primary-school-social-meta-orig-metric(organized)(color_optimized).PNG'.format(project,normalization), width=800))
display(Markdown('## Threshold "Backbone"'))
display(Image(url='images/{:s}/{:s}/primary-school-social-threshold.PNG'.format(project,normalization), width=800))
display(Markdown('## Random "Backbone")"'))
display(Image(url='images/{:s}/{:s}/primary-school-social-random-21(color-mapped).PNG'.format(project,normalization), width=800))

Modularity Quality¶

Metric Backbone¶

Threshold "Backbone"¶

Random "Backbone")"¶