Skip to content

Commit

Permalink
update more figures in sphinx docs
Browse files Browse the repository at this point in the history
  • Loading branch information
erdogant committed Oct 1, 2024
1 parent 3fe7292 commit bb62e1a
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 11 deletions.
Binary file modified docs/figs/fig_titanic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/figs/titanic_dag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/figs/titanic_dag_chi2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/pages/doctrees/UseCases.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/environment.pickle
Binary file not shown.
5 changes: 3 additions & 2 deletions docs/pages/html/UseCases.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ <h1>Use Case Titanic<a class="headerlink" href="#use-case-titanic" title="Link t
<span class="c1"># Compute edge strength with the chi_square test statistic</span>
<span class="n">model</span> <span class="o">=</span> <span class="n">bn</span><span class="o">.</span><span class="n">independence_test</span><span class="p">(</span><span class="n">model</span><span class="p">,</span> <span class="n">dfnum</span><span class="p">,</span> <span class="n">test</span><span class="o">=</span><span class="s1">&#39;chi_square&#39;</span><span class="p">,</span> <span class="n">prune</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="c1"># Plot</span>
<span class="n">bn</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">model</span><span class="p">,</span> <span class="n">interactive</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">pos</span><span class="o">=</span><span class="n">G</span><span class="p">[</span><span class="s1">&#39;pos&#39;</span><span class="p">])</span>
<span class="n">G</span> <span class="o">=</span> <span class="n">bn</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">model</span><span class="p">,</span> <span class="n">interactive</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">pos</span><span class="o">=</span><span class="n">G</span><span class="p">[</span><span class="s1">&#39;pos&#39;</span><span class="p">],</span> <span class="n">edge_labels</span><span class="o">=</span><span class="s1">&#39;pvalue&#39;</span><span class="p">)</span>

<span class="c1"># Parameter learning</span>
<span class="n">model</span> <span class="o">=</span> <span class="n">bn</span><span class="o">.</span><span class="n">parameter_learning</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="n">model</span><span class="p">,</span> <span class="n">dfnum</span><span class="p">)</span>
Expand All @@ -220,7 +220,8 @@ <h1>Use Case Titanic<a class="headerlink" href="#use-case-titanic" title="Link t
<caption><span class="caption-text">Learned structure on the Titanic dataset.</span><a class="headerlink" href="#id1" title="Link to this table"></a></caption>
<tbody>
<tr class="row-odd"><td><p><img alt="fig_t1" src="_images/titanic_dag.png" /></p></td>
<td><p><img alt="fig_t2" src="_images/titanic_dag_chi2.png" /></p></td>
</tr>
<tr class="row-even"><td><p><img alt="fig_t2" src="_images/titanic_dag_chi2.png" /></p></td>
</tr>
</tbody>
</table>
Expand Down
Binary file modified docs/pages/html/_images/fig_titanic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/pages/html/_images/titanic_dag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/pages/html/_images/titanic_dag_chi2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions docs/pages/html/_sources/UseCases.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ In the following example we will learn the structure on the Titanic dataset.
# Compute edge strength with the chi_square test statistic
model = bn.independence_test(model, dfnum, test='chi_square', prune=True)
# Plot
bn.plot(model, interactive=False, pos=G['pos'])
G = bn.plot(model, interactive=False, pos=G['pos'], edge_labels='pvalue')
# Parameter learning
model = bn.parameter_learning.fit(model, dfnum)
Expand All @@ -35,9 +35,11 @@ In the following example we will learn the structure on the Titanic dataset.
.. table:: Learned structure on the Titanic dataset.
:align: center

+----------+----------+
| |fig_t1| | |fig_t2| |
+----------+----------+
+----------+
| |fig_t1| |
+----------+
| |fig_t2| |
+----------+

At this point we can also start making inferences:

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/html/searchindex.js

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions docs/source/UseCases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ In the following example we will learn the structure on the Titanic dataset.
# Compute edge strength with the chi_square test statistic
model = bn.independence_test(model, dfnum, test='chi_square', prune=True)
# Plot
bn.plot(model, interactive=False, pos=G['pos'])
G = bn.plot(model, interactive=False, pos=G['pos'], edge_labels='pvalue')
# Parameter learning
model = bn.parameter_learning.fit(model, dfnum)
Expand All @@ -35,9 +35,11 @@ In the following example we will learn the structure on the Titanic dataset.
.. table:: Learned structure on the Titanic dataset.
:align: center

+----------+----------+
| |fig_t1| | |fig_t2| |
+----------+----------+
+----------+
| |fig_t1| |
+----------+
| |fig_t2| |
+----------+

At this point we can also start making inferences:

Expand Down

0 comments on commit bb62e1a

Please sign in to comment.