Skip to content

Commit

Permalink
doc updates [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Circle Ci committed Jan 6, 2025
1 parent c36565b commit ea42866
Show file tree
Hide file tree
Showing 161 changed files with 854 additions and 854 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified dev/_images/sphx_glr_plot_mixed_edge_graph_001.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 dev/_images/sphx_glr_plot_mixed_edge_graph_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dev/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<link href="../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
<link href="../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />

<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=8f2a1f02" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../_static/sg_gallery.css?v=d2d258e8" />
<link rel="stylesheet" type="text/css" href="../_static/sg_gallery-binder.css?v=f4aeca0c" />
Expand Down
22 changes: 11 additions & 11 deletions dev/_modules/pywhy_graphs/algorithms/cpdag.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<link href="../../../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
<link href="../../../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />

<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=8f2a1f02" />
<link rel="stylesheet" type="text/css" href="../../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery.css?v=d2d258e8" />
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery-binder.css?v=f4aeca0c" />
Expand Down Expand Up @@ -432,32 +432,32 @@
<article class="bd-article">

<h1>Source code for pywhy_graphs.algorithms.cpdag</h1><div class="highlight"><pre>
<span></span><span class="kn">from</span> <span class="nn">enum</span> <span class="kn">import</span> <span class="n">Enum</span>
<span></span><span class="kn">from</span><span class="w"> </span><span class="nn">enum</span><span class="w"> </span><span class="kn">import</span> <span class="n">Enum</span>

<span class="kn">import</span> <span class="nn">networkx</span> <span class="k">as</span> <span class="nn">nx</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">networkx</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">nx</span>

<span class="kn">import</span> <span class="nn">pywhy_graphs</span> <span class="k">as</span> <span class="nn">pg</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">pywhy_graphs</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">pg</span>

<span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;pdag_to_dag&quot;</span><span class="p">,</span> <span class="s2">&quot;dag_to_cpdag&quot;</span><span class="p">,</span> <span class="s2">&quot;pdag_to_cpdag&quot;</span><span class="p">,</span> <span class="s2">&quot;order_edges&quot;</span><span class="p">,</span> <span class="s2">&quot;label_edges&quot;</span><span class="p">]</span>


<span class="k">class</span> <span class="nc">EDGELABELS</span><span class="p">(</span><span class="n">Enum</span><span class="p">):</span>
<span class="k">class</span><span class="w"> </span><span class="nc">EDGELABELS</span><span class="p">(</span><span class="n">Enum</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Edge labels for a CPDAG.&quot;&quot;&quot;</span>

<span class="n">COMPELLED</span> <span class="o">=</span> <span class="s2">&quot;compelled&quot;</span>
<span class="n">REVERSIBLE</span> <span class="o">=</span> <span class="s2">&quot;reversible&quot;</span>
<span class="n">UNKNOWN</span> <span class="o">=</span> <span class="s2">&quot;unknown&quot;</span>


<span class="k">def</span> <span class="nf">is_clique</span><span class="p">(</span><span class="n">G</span><span class="p">,</span> <span class="n">nodelist</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="nf">is_clique</span><span class="p">(</span><span class="n">G</span><span class="p">,</span> <span class="n">nodelist</span><span class="p">):</span>
<span class="n">H</span> <span class="o">=</span> <span class="n">G</span><span class="o">.</span><span class="n">subgraph</span><span class="p">(</span><span class="n">nodelist</span><span class="p">)</span>
<span class="n">n</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">nodelist</span><span class="p">)</span>
<span class="k">return</span> <span class="n">H</span><span class="o">.</span><span class="n">size</span><span class="p">()</span> <span class="o">==</span> <span class="n">n</span> <span class="o">*</span> <span class="p">(</span><span class="n">n</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> <span class="o">/</span> <span class="mi">2</span>


<div class="viewcode-block" id="order_edges">
<a class="viewcode-back" href="../../../generated/pywhy_graphs.algorithms.order_edges.html#pywhy_graphs.algorithms.order_edges">[docs]</a>
<span class="k">def</span> <span class="nf">order_edges</span><span class="p">(</span><span class="n">G</span><span class="p">:</span> <span class="n">nx</span><span class="o">.</span><span class="n">DiGraph</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="nf">order_edges</span><span class="p">(</span><span class="n">G</span><span class="p">:</span> <span class="n">nx</span><span class="o">.</span><span class="n">DiGraph</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Find total ordering of the edges of DAG G.</span>

<span class="sd"> A total ordering is a topological sorting of the nodes, and then</span>
Expand Down Expand Up @@ -509,7 +509,7 @@ <h1>Source code for pywhy_graphs.algorithms.cpdag</h1><div class="highlight"><pr

<div class="viewcode-block" id="label_edges">
<a class="viewcode-back" href="../../../generated/pywhy_graphs.algorithms.label_edges.html#pywhy_graphs.algorithms.label_edges">[docs]</a>
<span class="k">def</span> <span class="nf">label_edges</span><span class="p">(</span><span class="n">G</span><span class="p">:</span> <span class="n">nx</span><span class="o">.</span><span class="n">DiGraph</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="nf">label_edges</span><span class="p">(</span><span class="n">G</span><span class="p">:</span> <span class="n">nx</span><span class="o">.</span><span class="n">DiGraph</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Label compelled and reversible edges of a DAG G.</span>

<span class="sd"> Label the edges of a DAG G as either compelled or reversible. Compelled</span>
Expand Down Expand Up @@ -590,7 +590,7 @@ <h1>Source code for pywhy_graphs.algorithms.cpdag</h1><div class="highlight"><pr

<div class="viewcode-block" id="pdag_to_dag">
<a class="viewcode-back" href="../../../generated/pywhy_graphs.algorithms.pdag_to_dag.html#pywhy_graphs.algorithms.pdag_to_dag">[docs]</a>
<span class="k">def</span> <span class="nf">pdag_to_dag</span><span class="p">(</span><span class="n">G</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="nf">pdag_to_dag</span><span class="p">(</span><span class="n">G</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Compute consistent extension of given PDAG resulting in a DAG.</span>

<span class="sd"> Implements the algorithm described in Figure 11 of :footcite:`chickering2002learning`.</span>
Expand Down Expand Up @@ -677,7 +677,7 @@ <h1>Source code for pywhy_graphs.algorithms.cpdag</h1><div class="highlight"><pr

<div class="viewcode-block" id="dag_to_cpdag">
<a class="viewcode-back" href="../../../generated/pywhy_graphs.algorithms.dag_to_cpdag.html#pywhy_graphs.algorithms.dag_to_cpdag">[docs]</a>
<span class="k">def</span> <span class="nf">dag_to_cpdag</span><span class="p">(</span><span class="n">G</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="nf">dag_to_cpdag</span><span class="p">(</span><span class="n">G</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Convert a DAG to a CPDAG.</span>

<span class="sd"> Creates a CPDAG from a DAG.</span>
Expand Down Expand Up @@ -711,7 +711,7 @@ <h1>Source code for pywhy_graphs.algorithms.cpdag</h1><div class="highlight"><pr

<div class="viewcode-block" id="pdag_to_cpdag">
<a class="viewcode-back" href="../../../generated/pywhy_graphs.algorithms.pdag_to_cpdag.html#pywhy_graphs.algorithms.pdag_to_cpdag">[docs]</a>
<span class="k">def</span> <span class="nf">pdag_to_cpdag</span><span class="p">(</span><span class="n">G</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="nf">pdag_to_cpdag</span><span class="p">(</span><span class="n">G</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Convert a PDAG to a CPDAG.</span>

<span class="sd"> Parameters</span>
Expand Down
10 changes: 5 additions & 5 deletions dev/_modules/pywhy_graphs/algorithms/cyclic.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<link href="../../../_static/styles/theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />
<link href="../../../_static/styles/pydata-sphinx-theme.css?digest=8878045cc6db502f8baf" rel="stylesheet" />

<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=8f2a1f02" />
<link rel="stylesheet" type="text/css" href="../../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery.css?v=d2d258e8" />
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery-binder.css?v=f4aeca0c" />
Expand Down Expand Up @@ -432,14 +432,14 @@
<article class="bd-article">

<h1>Source code for pywhy_graphs.algorithms.cyclic</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">networkx</span> <span class="k">as</span> <span class="nn">nx</span>
<span></span><span class="kn">import</span><span class="w"> </span><span class="nn">networkx</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">nx</span>

<span class="kn">import</span> <span class="nn">pywhy_graphs.networkx</span> <span class="k">as</span> <span class="nn">pywhy_nx</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">pywhy_graphs.networkx</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">pywhy_nx</span>


<div class="viewcode-block" id="acyclification">
<a class="viewcode-back" href="../../../generated/pywhy_graphs.algorithms.acyclification.html#pywhy_graphs.algorithms.acyclification">[docs]</a>
<span class="k">def</span> <span class="nf">acyclification</span><span class="p">(</span>
<span class="k">def</span><span class="w"> </span><span class="nf">acyclification</span><span class="p">(</span>
<span class="n">G</span><span class="p">:</span> <span class="n">pywhy_nx</span><span class="o">.</span><span class="n">MixedEdgeGraph</span><span class="p">,</span>
<span class="n">directed_edge_type</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;directed&quot;</span><span class="p">,</span>
<span class="n">bidirected_edge_type</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;bidirected&quot;</span><span class="p">,</span>
Expand Down Expand Up @@ -544,7 +544,7 @@ <h1>Source code for pywhy_graphs.algorithms.cyclic</h1><div class="highlight"><p



<span class="k">def</span> <span class="nf">sigma_separated</span><span class="p">(</span><span class="n">G</span><span class="p">:</span> <span class="n">pywhy_nx</span><span class="o">.</span><span class="n">MixedEdgeGraph</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="nf">sigma_separated</span><span class="p">(</span><span class="n">G</span><span class="p">:</span> <span class="n">pywhy_nx</span><span class="o">.</span><span class="n">MixedEdgeGraph</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">):</span>
<span class="n">acy_G</span> <span class="o">=</span> <span class="n">acyclification</span><span class="p">(</span><span class="n">G</span><span class="p">)</span>
<span class="k">return</span> <span class="n">pywhy_nx</span><span class="o">.</span><span class="n">m_separated</span><span class="p">(</span><span class="n">acy_G</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">)</span>
</pre></div>
Expand Down
Loading

0 comments on commit ea42866

Please sign in to comment.