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/
from IPython.core.display import display, Math, Image, HTML, Markdown
import pandas as pd
project = 'primary-school'
normalization = 'social'
display(Image(url='images/{:s}/{:s}/graph_original_metalabels.png'.format(project,normalization), width=600))
display(Markdown('## Modularity in networks with original node position'))
display(Image(url='images/{:s}/{:s}/graph_comparison.png'.format(project,normalization)))
display(Markdown('## Modularity in networks with recomputed node position'))
Image(url='images/{:s}/{:s}/graph_comparison_layout.png'.format(project,normalization))
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)
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>
"""))
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>
"""))
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>
"""))
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>
"""))
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))