Skip to content

Commit

Permalink
Deploying to gh-pages from @ 4cc82de 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneCmb committed Jul 3, 2024
1 parent 25dec8a commit fc67400
Show file tree
Hide file tree
Showing 28 changed files with 133 additions and 131 deletions.
Binary file not shown.
Binary file not shown.
19 changes: 9 additions & 10 deletions _downloads/f7b4d3ee3425c256000f851a9411a3e2/plot_syn_phiID.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
Integrated Information Decomposition
====================================
This example illustrates how to use and interpret synergy and
redundancy as defined in the Integrated Information
Decomposition framework
This example illustrates how to use and interpret synergy and redundancy as
defined in the Integrated Information Decomposition framework
"""

import numpy as np
Expand Down Expand Up @@ -36,17 +35,17 @@
# the couple of variables under study. It measures how much we can predict the
# future state of the couple of variables when considering them as a whole with
# respect to when considering them separately.
# Redundancy instead, following the MMI framework approximation is computed in the following way:
# Redundancy instead, following the MMI framework approximation is computed in
# the following way:

# %%
# .. math::
# Red(X,Y) = min (I(X_{t-\tau};Y_{t}), I(X_{t-\tau};X_t), I(Y_{t-\tau};X_t),
# I(Y_{t-\tau};Y_t))
# Red(X,Y) = min (I(X_{t-\tau}; Y_{t}), I(X_{t-\tau}; X_t),
# I(Y_{t-\tau}; X_t), I(Y_{t-\tau}; Y_t))
#
# Redundancy relates to the ammount of information the two variables share about
# their own future. An high presence of redundancy can be
# associated with robustness, while an stroger presence of synergy to
# emergence.
# Redundancy relates to the ammount of information the two variables share
# about their own future. An high presence of redundancy can be associated with
# robustness, while an stroger presence of synergy to emergence.

###############################################################################
# Simulate synergy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"\n# Integrated Information Decomposition\n\nThis example illustrates how to use and interpret synergy and \nredundancy as defined in the Integrated Information \nDecomposition framework\n"
"\n# Integrated Information Decomposition\n\nThis example illustrates how to use and interpret synergy and redundancy as\ndefined in the Integrated Information Decomposition framework\n"
]
},
{
Expand All @@ -29,14 +29,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"\\begin{align}Syn(X,Y) = I(X_{t-\\tau},Y_{t-\\tau};X_{t},Y_t) -\n max \\{ I(X_{t-\\tau};X_t,Y_t),I(Y_{t-\\tau};X_t,Y_t) \\}\\end{align}\n\nSynergy is a positive defined measures that relates to emergent properties of\nthe couple of variables under study. It measures how much we can predict the\nfuture state of the couple of variables when considering them as a whole with\nrespect to when considering them separately.\nRedundancy instead, following the MMI framework approximation is computed in the following way:\n\n"
"\\begin{align}Syn(X,Y) = I(X_{t-\\tau},Y_{t-\\tau};X_{t},Y_t) -\n max \\{ I(X_{t-\\tau};X_t,Y_t),I(Y_{t-\\tau};X_t,Y_t) \\}\\end{align}\n\nSynergy is a positive defined measures that relates to emergent properties of\nthe couple of variables under study. It measures how much we can predict the\nfuture state of the couple of variables when considering them as a whole with\nrespect to when considering them separately.\nRedundancy instead, following the MMI framework approximation is computed in\nthe following way:\n\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\\begin{align}Red(X,Y) = min (I(X_{t-\\tau};Y_{t}), I(X_{t-\\tau};X_t), I(Y_{t-\\tau};X_t),\n I(Y_{t-\\tau};Y_t))\\end{align}\n\nRedundancy relates to the ammount of information the two variables share about\ntheir own future. An high presence of redundancy can be\nassociated with robustness, while an stroger presence of synergy to\nemergence.\n\n"
"\\begin{align}Red(X,Y) = min (I(X_{t-\\tau}; Y_{t}), I(X_{t-\\tau}; X_t),\n I(Y_{t-\\tau}; X_t), I(Y_{t-\\tau}; Y_t))\\end{align}\n\nRedundancy relates to the ammount of information the two variables share\nabout their own future. An high presence of redundancy can be associated with\nrobustness, while an stroger presence of synergy to emergence.\n\n"
]
},
{
Expand Down
4 changes: 3 additions & 1 deletion _modules/hoi/metrics/phiid_red.html
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,9 @@ <h1>Source code for hoi.metrics.phiid_red</h1><div class="highlight"><pre>
<span class="n">hoi</span> <span class="o">=</span> <span class="n">jnp</span><span class="o">.</span><span class="n">zeros</span><span class="p">((</span><span class="nb">len</span><span class="p">(</span><span class="n">order</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">n_variables</span><span class="p">),</span> <span class="n">dtype</span><span class="o">=</span><span class="n">jnp</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span>

<span class="k">for</span> <span class="n">msize</span> <span class="ow">in</span> <span class="n">pbar</span><span class="p">:</span>
<span class="n">pbar</span><span class="o">.</span><span class="n">set_description</span><span class="p">(</span><span class="n">desc</span><span class="o">=</span><span class="s2">&quot;RedMMI order </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">msize</span><span class="p">,</span> <span class="n">refresh</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">pbar</span><span class="o">.</span><span class="n">set_description</span><span class="p">(</span>
<span class="n">desc</span><span class="o">=</span><span class="s2">&quot;RedPhiIDMMI order </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">msize</span><span class="p">,</span> <span class="n">refresh</span><span class="o">=</span><span class="kc">False</span>
<span class="p">)</span>

<span class="c1"># combinations of features</span>
<span class="n">_h_idx</span> <span class="o">=</span> <span class="n">h_idx</span><span class="p">[</span><span class="n">order</span> <span class="o">==</span> <span class="n">msize</span><span class="p">,</span> <span class="mi">0</span><span class="p">:</span><span class="n">msize</span><span class="p">]</span>
Expand Down
4 changes: 3 additions & 1 deletion _modules/hoi/metrics/phiid_syn.html
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,9 @@ <h1>Source code for hoi.metrics.phiid_syn</h1><div class="highlight"><pre>
<span class="n">hoi</span> <span class="o">=</span> <span class="n">jnp</span><span class="o">.</span><span class="n">zeros</span><span class="p">((</span><span class="nb">len</span><span class="p">(</span><span class="n">order</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">n_variables</span><span class="p">),</span> <span class="n">dtype</span><span class="o">=</span><span class="n">jnp</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span>

<span class="k">for</span> <span class="n">msize</span> <span class="ow">in</span> <span class="n">pbar</span><span class="p">:</span>
<span class="n">pbar</span><span class="o">.</span><span class="n">set_description</span><span class="p">(</span><span class="n">desc</span><span class="o">=</span><span class="s2">&quot;SynMMI order </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">msize</span><span class="p">,</span> <span class="n">refresh</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">pbar</span><span class="o">.</span><span class="n">set_description</span><span class="p">(</span>
<span class="n">desc</span><span class="o">=</span><span class="s2">&quot;SynPhiIDMMI order </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">msize</span><span class="p">,</span> <span class="n">refresh</span><span class="o">=</span><span class="kc">False</span>
<span class="p">)</span>

<span class="c1"># combinations of features</span>
<span class="n">_h_idx</span> <span class="o">=</span> <span class="n">h_idx</span><span class="p">[</span><span class="n">order</span> <span class="o">==</span> <span class="n">msize</span><span class="p">,</span> <span class="mi">0</span><span class="p">:</span><span class="n">msize</span><span class="p">]</span>
Expand Down
2 changes: 1 addition & 1 deletion api/generated/hoi.metrics.RedundancyphiID.html
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ <h1>hoi.metrics.RedundancyphiID<a class="headerlink" href="#hoi-metrics-redundan

<section id="examples-using-hoi-metrics-redundancyphiid">
<span id="sphx-glr-backreferences-hoi-metrics-redundancyphiid"></span><h2>Examples using <code class="docutils literal notranslate"><span class="pre">hoi.metrics.RedundancyphiID</span></code><a class="headerlink" href="#examples-using-hoi-metrics-redundancyphiid" title="Link to this heading">#</a></h2>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to use and interpret synergy and redundancy as defined in the Int..."><img alt="" src="../../_images/sphx_glr_plot_syn_phiID_thumb.png" />
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to use and interpret synergy and redundancy as defined in the Inte..."><img alt="" src="../../_images/sphx_glr_plot_syn_phiID_thumb.png" />
<p><a class="reference internal" href="../../auto_examples/metrics/plot_syn_phiID.html#sphx-glr-auto-examples-metrics-plot-syn-phiid-py"><span class="std std-ref">Integrated Information Decomposition</span></a></p>
<div class="sphx-glr-thumbnail-title">Integrated Information Decomposition</div>
</div></div></section>
Expand Down
2 changes: 1 addition & 1 deletion api/generated/hoi.metrics.SynergyphiID.html
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ <h1>hoi.metrics.SynergyphiID<a class="headerlink" href="#hoi-metrics-synergyphii

<section id="examples-using-hoi-metrics-synergyphiid">
<span id="sphx-glr-backreferences-hoi-metrics-synergyphiid"></span><h2>Examples using <code class="docutils literal notranslate"><span class="pre">hoi.metrics.SynergyphiID</span></code><a class="headerlink" href="#examples-using-hoi-metrics-synergyphiid" title="Link to this heading">#</a></h2>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to use and interpret synergy and redundancy as defined in the Int..."><img alt="" src="../../_images/sphx_glr_plot_syn_phiID_thumb.png" />
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to use and interpret synergy and redundancy as defined in the Inte..."><img alt="" src="../../_images/sphx_glr_plot_syn_phiID_thumb.png" />
<p><a class="reference internal" href="../../auto_examples/metrics/plot_syn_phiID.html#sphx-glr-auto-examples-metrics-plot-syn-phiid-py"><span class="std std-ref">Integrated Information Decomposition</span></a></p>
<div class="sphx-glr-thumbnail-title">Integrated Information Decomposition</div>
</div></div></section>
Expand Down
2 changes: 1 addition & 1 deletion api/generated/hoi.utils.get_nbest_mult.html
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ <h1>hoi.utils.get_nbest_mult<a class="headerlink" href="#hoi-utils-get-nbest-mul
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to use and interpret the Redundancy-Synergy Index (RSI)."><img alt="" src="../../_images/sphx_glr_plot_rsi_thumb.png" />
<p><a class="reference internal" href="../../auto_examples/metrics/plot_rsi.html#sphx-glr-auto-examples-metrics-plot-rsi-py"><span class="std std-ref">Redundancy-Synergy Index</span></a></p>
<div class="sphx-glr-thumbnail-title">Redundancy-Synergy Index</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to use and interpret synergy and redundancy as defined in the Int..."><img alt="" src="../../_images/sphx_glr_plot_syn_phiID_thumb.png" />
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to use and interpret synergy and redundancy as defined in the Inte..."><img alt="" src="../../_images/sphx_glr_plot_syn_phiID_thumb.png" />
<p><a class="reference internal" href="../../auto_examples/metrics/plot_syn_phiID.html#sphx-glr-auto-examples-metrics-plot-syn-phiid-py"><span class="std std-ref">Integrated Information Decomposition</span></a></p>
<div class="sphx-glr-thumbnail-title">Integrated Information Decomposition</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to use the O-information and how it&#x27;s linked to other metrics such..."><img alt="" src="../../_images/sphx_glr_plot_oinfo_thumb.png" />
Expand Down
2 changes: 1 addition & 1 deletion auto_examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ <h1>Metrics of HOI<a class="headerlink" href="#metrics-of-hoi" title="Link to th
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to use and interpret the Redundancy-Synergy Index (RSI)."><img alt="" src="../_images/sphx_glr_plot_rsi_thumb.png" />
<p><a class="reference internal" href="metrics/plot_rsi.html#sphx-glr-auto-examples-metrics-plot-rsi-py"><span class="std std-ref">Redundancy-Synergy Index</span></a></p>
<div class="sphx-glr-thumbnail-title">Redundancy-Synergy Index</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to use and interpret synergy and redundancy as defined in the Int..."><img alt="" src="../_images/sphx_glr_plot_syn_phiID_thumb.png" />
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to use and interpret synergy and redundancy as defined in the Inte..."><img alt="" src="../_images/sphx_glr_plot_syn_phiID_thumb.png" />
<p><a class="reference internal" href="metrics/plot_syn_phiID.html#sphx-glr-auto-examples-metrics-plot-syn-phiid-py"><span class="std std-ref">Integrated Information Decomposition</span></a></p>
<div class="sphx-glr-thumbnail-title">Integrated Information Decomposition</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to use the O-information and how it&#x27;s linked to other metrics such..."><img alt="" src="../_images/sphx_glr_plot_oinfo_thumb.png" />
Expand Down
2 changes: 1 addition & 1 deletion auto_examples/it/plot_entropies.html
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ <h2>Entropy of data sampled from an exponential distribution<a class="headerlink
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div>
</div>
<img src="../../_images/sphx_glr_plot_entropies_003.png" srcset="../../_images/sphx_glr_plot_entropies_003.png" alt="Comparison of entropy estimators when the data are sampled from a exponential distribution" class = "sphx-glr-single-img"/><p class="sphx-glr-timing"><strong>Total running time of the script:</strong> (0 minutes 26.790 seconds)</p>
<img src="../../_images/sphx_glr_plot_entropies_003.png" srcset="../../_images/sphx_glr_plot_entropies_003.png" alt="Comparison of entropy estimators when the data are sampled from a exponential distribution" class = "sphx-glr-single-img"/><p class="sphx-glr-timing"><strong>Total running time of the script:</strong> (0 minutes 26.914 seconds)</p>
<div class="sphx-glr-footer sphx-glr-footer-example docutils container" id="sphx-glr-download-auto-examples-it-plot-entropies-py">
<div class="sphx-glr-download sphx-glr-download-jupyter docutils container">
<p><a class="reference download internal" download="" href="../../_downloads/a1ef8dbbc19c785bec2a5cc12335798e/plot_entropies.ipynb"><code class="xref download docutils literal notranslate"><span class="pre">Download</span> <span class="pre">Jupyter</span> <span class="pre">notebook:</span> <span class="pre">plot_entropies.ipynb</span></code></a></p>
Expand Down
2 changes: 1 addition & 1 deletion auto_examples/it/plot_mi.html
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ <h2>MI of data sampled from normal distribution<a class="headerlink" href="#mi-o
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div>
</div>
<img src="../../_images/sphx_glr_plot_mi_001.png" srcset="../../_images/sphx_glr_plot_mi_001.png" alt="Comparison of MI estimators when the data are sampled from a normal distribution" class = "sphx-glr-single-img"/><p class="sphx-glr-timing"><strong>Total running time of the script:</strong> (0 minutes 17.380 seconds)</p>
<img src="../../_images/sphx_glr_plot_mi_001.png" srcset="../../_images/sphx_glr_plot_mi_001.png" alt="Comparison of MI estimators when the data are sampled from a normal distribution" class = "sphx-glr-single-img"/><p class="sphx-glr-timing"><strong>Total running time of the script:</strong> (0 minutes 17.352 seconds)</p>
<div class="sphx-glr-footer sphx-glr-footer-example docutils container" id="sphx-glr-download-auto-examples-it-plot-mi-py">
<div class="sphx-glr-download sphx-glr-download-jupyter docutils container">
<p><a class="reference download internal" download="" href="../../_downloads/f14e92090ebeb63084124f7809315b90/plot_mi.ipynb"><code class="xref download docutils literal notranslate"><span class="pre">Download</span> <span class="pre">Jupyter</span> <span class="pre">notebook:</span> <span class="pre">plot_mi.ipynb</span></code></a></p>
Expand Down
2 changes: 1 addition & 1 deletion auto_examples/it/plot_tutorial_core.html
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ <h2>Mutual information<a class="headerlink" href="#mutual-information" title="Li
<div class="sphx-glr-script-out highlight-none notranslate"><div class="highlight"><pre><span></span>Mutual information between x and y: 0.01
</pre></div>
</div>
<p class="sphx-glr-timing"><strong>Total running time of the script:</strong> (0 minutes 0.120 seconds)</p>
<p class="sphx-glr-timing"><strong>Total running time of the script:</strong> (0 minutes 0.121 seconds)</p>
<div class="sphx-glr-footer sphx-glr-footer-example docutils container" id="sphx-glr-download-auto-examples-it-plot-tutorial-core-py">
<div class="sphx-glr-download sphx-glr-download-jupyter docutils container">
<p><a class="reference download internal" download="" href="../../_downloads/5b339cefcfab9a7df160c5f43bed58df/plot_tutorial_core.ipynb"><code class="xref download docutils literal notranslate"><span class="pre">Download</span> <span class="pre">Jupyter</span> <span class="pre">notebook:</span> <span class="pre">plot_tutorial_core.ipynb</span></code></a></p>
Expand Down
8 changes: 4 additions & 4 deletions auto_examples/it/sg_execution_times.html
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ <h1>Computation times</h1>

<section id="computation-times">
<span id="sphx-glr-auto-examples-it-sg-execution-times"></span><h1>Computation times<a class="headerlink" href="#computation-times" title="Link to this heading">#</a></h1>
<p><strong>00:44.290</strong> total execution time for 3 files <strong>from auto_examples/it</strong>:</p>
<p><strong>00:44.387</strong> total execution time for 3 files <strong>from auto_examples/it</strong>:</p>
<div class="docutils container">
<style scoped>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet" />
Expand All @@ -441,15 +441,15 @@ <h1>Computation times</h1>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference internal" href="plot_entropies.html#sphx-glr-auto-examples-it-plot-entropies-py"><span class="std std-ref">Comparison of entropy estimators</span></a> (<code class="docutils literal notranslate"><span class="pre">plot_entropies.py</span></code>)</p></td>
<td><p>00:26.790</p></td>
<td><p>00:26.914</p></td>
<td><p>0.0</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="plot_mi.html#sphx-glr-auto-examples-it-plot-mi-py"><span class="std std-ref">Comparison of mutual-information estimators</span></a> (<code class="docutils literal notranslate"><span class="pre">plot_mi.py</span></code>)</p></td>
<td><p>00:17.380</p></td>
<td><p>00:17.352</p></td>
<td><p>0.0</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="plot_tutorial_core.html#sphx-glr-auto-examples-it-plot-tutorial-core-py"><span class="std std-ref">Introduction to core information theoretical metrics</span></a> (<code class="docutils literal notranslate"><span class="pre">plot_tutorial_core.py</span></code>)</p></td>
<td><p>00:00.120</p></td>
<td><p>00:00.121</p></td>
<td><p>0.0</p></td>
</tr>
</tbody>
Expand Down
Loading

0 comments on commit fc67400

Please sign in to comment.