Reference: R. Mastrandrea, J. Fournet, A. Barrat, Contact patterns in a high school: a comparison between data collected using wearable sensors, contact diaries and friendship surveys. PLoS ONE 10(9): e0136497 (2015).
Original data: http://www.sociopatterns.org/datasets/high-school-contact-and-friendship-networks/
from IPython.core.display import display, Math, Image, HTML, Markdown
import pandas as pd
project = 'high-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 = [
('9' ,'-','-' ,'-'),
('10','17','28','47.19(±3.79)'),
]
pd.DataFrame(data, columns=['Original','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.09/0.08</td>
<td>0.22/0.12</td>
<td>0.26/0.06</td>
<td>0.44(±1.81e-02)/0.12(±1.62e-02)</td>
</tr><tr>
<td>Original proximity</td>
<td>-</td>
<td>0.15/0.04</td>
<td>0.18/0.01</td>
<td>0.42(±1.87e-02)/0.13(±1.63e-02)</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.88</td>
<td>0.691</td>
<td>0.544</td>
<td>0.39(±1.55e-02)</td>
</tr><tr>
<td>Original proximity</td>
<td>-</td>
<td>0.754</td>
<td>0.595</td>
<td>0.38(±0.02)</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.89/0.81</td>
<td>0.75/0.47</td>
<td>0.67/0.29</td>
<td>0.35(±3.61e-02)/0.14(±1.46e-02)</td>
</tr><tr>
<td>Original proximity</td>
<td>-</td>
<td>0.82/0.56</td>
<td>0.75/0.35</td>
<td>0.34(±0.04)/0.14(±0.01)</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.87</td>
<td>0.66</td>
<td>0.56</td>
<td>0.27(±3.53e-02)</td>
</tr><tr>
<td>Original proximity</td>
<td>-</td>
<td>0.72</td>
<td>0.62</td>
<td>0.26(±0.03)</td>
</tr></table>
<small>* Results on 100 realizations.</small>
"""))
display(Markdown('## Modularity Quality'))
display(Markdown('## Metric Backbone'))
display(Image(url='images/{:s}/{:s}/high-school-social-meta-original-metric(Not condensed).PNG'.format(project,normalization), width=800))
display(Markdown('## Threshold "Backbone"'))
display(Image(url='images/{:s}/{:s}/high-school-social-threshold.PNG'.format(project,normalization), width=800))
display(Markdown('## Random "Backbone")"'))
display(Image(url='images/{:s}/{:s}/high-school-social-random.PNG'.format(project,normalization), width=800))