Skip to content

Commit

Permalink
CircleCI update of dev docs (87).
Browse files Browse the repository at this point in the history
  • Loading branch information
Circle CI committed May 29, 2024
1 parent 3e43d37 commit 486f372
Show file tree
Hide file tree
Showing 10 changed files with 131 additions and 86 deletions.
191 changes: 118 additions & 73 deletions dev/_modules/torchdr/affinity/entropic.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dev/_modules/torchdr/utils/optim.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h1>Source code for torchdr.utils.optim</h1><div class="highlight"><pre>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> f : function :math:`\mathbb{R}^n \to \mathbb{R}^n`</span>
<span class="sd"> f : function :math:`\mathbb{R}_{&gt;0} \to \mathbb{R}`</span>
<span class="sd"> batched 1d increasing function which root should be computed.</span>
<span class="sd"> n : int</span>
<span class="sd"> size of the input of f.</span>
Expand Down Expand Up @@ -184,7 +184,7 @@ <h1>Source code for torchdr.utils.optim</h1><div class="highlight"><pre>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> f : function :math:`\mathbb{R}^n \to \mathbb{R}^n`</span>
<span class="sd"> f : function :math:`\mathbb{R}_{&gt;0} \to \mathbb{R}`</span>
<span class="sd"> increasing function which root should be computed.</span>
<span class="sd"> n : int</span>
<span class="sd"> size of the input of f.</span>
Expand Down
6 changes: 3 additions & 3 deletions dev/all.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ <h2>Main module <a class="reference internal" href="#module-torchdr" title="torc
<h2>Affinity module <a class="reference internal" href="#module-torchdr.affinity" title="torchdr.affinity"><code class="xref py py-mod docutils literal notranslate"><span class="pre">torchdr.affinity</span></code></a><a class="headerlink" href="#affinity-module-torchdr-affinity" title="Link to this heading"></a></h2>
<span class="target" id="module-torchdr.affinity"></span><table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="gen_modules/torchdr.affinity.EntropicAffinity.html#torchdr.affinity.EntropicAffinity" title="torchdr.affinity.EntropicAffinity"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EntropicAffinity</span></code></a>(perplexity[, tol, ...])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="gen_modules/torchdr.affinity.EntropicAffinity.html#torchdr.affinity.EntropicAffinity" title="torchdr.affinity.EntropicAffinity"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EntropicAffinity</span></code></a>([perplexity, tol, ...])</p></td>
<td><p>Solves the directed entropic affinity problem introduced in <a class="reference internal" href="gen_modules/torchdr.affinity.EntropicAffinity.html#r1333502c7ceb-1" id="id1"><span>[R1333502c7ceb-1]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="gen_modules/torchdr.affinity.SymmetricEntropicAffinity.html#torchdr.affinity.SymmetricEntropicAffinity" title="torchdr.affinity.SymmetricEntropicAffinity"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SymmetricEntropicAffinity</span></code></a>(perplexity[, lr, ...])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="gen_modules/torchdr.affinity.SymmetricEntropicAffinity.html#torchdr.affinity.SymmetricEntropicAffinity" title="torchdr.affinity.SymmetricEntropicAffinity"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SymmetricEntropicAffinity</span></code></a>([perplexity, lr, ...])</p></td>
<td><p>Computes the solution <span class="math notranslate nohighlight">\(\mathbf{P}^{\mathrm{se}}\)</span> to the symmetric entropic affinity problem (SEA) described in <a class="reference internal" href="gen_modules/torchdr.affinity.SymmetricEntropicAffinity.html#r10aba7b01f7e-3" id="id2"><span>[R10aba7b01f7e-3]</span></a> with the dual ascent procedure.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="gen_modules/torchdr.affinity.L2SymmetricEntropicAffinity.html#torchdr.affinity.L2SymmetricEntropicAffinity" title="torchdr.affinity.L2SymmetricEntropicAffinity"><code class="xref py py-obj docutils literal notranslate"><span class="pre">L2SymmetricEntropicAffinity</span></code></a>(perplexity[, ...])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="gen_modules/torchdr.affinity.L2SymmetricEntropicAffinity.html#torchdr.affinity.L2SymmetricEntropicAffinity" title="torchdr.affinity.L2SymmetricEntropicAffinity"><code class="xref py py-obj docutils literal notranslate"><span class="pre">L2SymmetricEntropicAffinity</span></code></a>([perplexity, ...])</p></td>
<td><p>Computes the L2-symmetrized entropic affinity matrix <span class="math notranslate nohighlight">\(\overline{\mathbf{P}^{\mathrm{e}}}\)</span> of t-SNE <a class="reference internal" href="gen_modules/torchdr.affinity.L2SymmetricEntropicAffinity.html#rc6132c17e3ca-2" id="id3"><span>[Rc6132c17e3ca-2]</span></a>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="gen_modules/torchdr.affinity.DoublyStochasticEntropic.html#torchdr.affinity.DoublyStochasticEntropic" title="torchdr.affinity.DoublyStochasticEntropic"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DoublyStochasticEntropic</span></code></a>([eps, init_dual, ...])</p></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<h1>torchdr.affinity.DoublyStochasticEntropic<a class="headerlink" href="#torchdr-affinity-doublystochasticentropic" title="Link to this heading"></a></h1>
<dl class="py function">
<dt class="sig sig-object py" id="torchdr.affinity.DoublyStochasticEntropic">
<span class="sig-prename descclassname"><span class="pre">torchdr.affinity.</span></span><span class="sig-name descname"><span class="pre">DoublyStochasticEntropic</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">eps</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">init_dual</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tol</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-05</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_iter</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1000</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">student</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tolog</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">metric</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'euclidean'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">device</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">keops</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/torchdr/affinity/entropic.html#DoublyStochasticEntropic"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#torchdr.affinity.DoublyStochasticEntropic" title="Link to this definition"></a></dt>
<span class="sig-prename descclassname"><span class="pre">torchdr.affinity.</span></span><span class="sig-name descname"><span class="pre">DoublyStochasticEntropic</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">eps</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">init_dual</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Tensor</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tol</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1e-05</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_iter</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1000</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">base_kernel</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'gaussian'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tolog</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">metric</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'euclidean'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">device</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">keops</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/torchdr/affinity/entropic.html#DoublyStochasticEntropic"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#torchdr.affinity.DoublyStochasticEntropic" title="Link to this definition"></a></dt>
<dd><p>Computes the symmetric doubly stochastic affinity matrix <span class="math notranslate nohighlight">\(\mathbf{P}^{\mathrm{ds}}\)</span> with controlled global entropy using the symmetric Sinkhorn algorithm <a class="reference internal" href="#r3be52251fbbb-5" id="id1">[5]</a>.
Consists in solving the following symmetric entropic optimal transport problem [6]:</p>
<div class="math notranslate nohighlight">
Expand Down Expand Up @@ -135,7 +135,7 @@ <h1>torchdr.affinity.DoublyStochasticEntropic<a class="headerlink" href="#torchd
</dd>
<dt><strong>max_iter</strong><span class="classifier">int, optional</span></dt><dd><p>Number of maximum iterations for the algorithm.</p>
</dd>
<dt><strong>student</strong><span class="classifier">bool, optional</span></dt><dd><p>Whether to use a t-Student kernel instead of a Gaussian kernel.</p>
<dt><strong>base_kernel</strong><span class="classifier">{“gaussian”, “student”}, optional</span></dt><dd><p>Which base kernel to normalize as doubly stochastic.</p>
</dd>
<dt><strong>tolog</strong><span class="classifier">bool, optional</span></dt><dd><p>Whether to store intermediate result in a dictionary.</p>
</dd>
Expand Down
2 changes: 1 addition & 1 deletion dev/gen_modules/torchdr.affinity.EntropicAffinity.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<h1>torchdr.affinity.EntropicAffinity<a class="headerlink" href="#torchdr-affinity-entropicaffinity" title="Link to this heading"></a></h1>
<dl class="py function">
<dt class="sig sig-object py" id="torchdr.affinity.EntropicAffinity">
<span class="sig-prename descclassname"><span class="pre">torchdr.affinity.</span></span><span class="sig-name descname"><span class="pre">EntropicAffinity</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">perplexity</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tol</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.001</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_iter</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1000</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sparsity</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">metric</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'euclidean'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">device</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">keops</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/torchdr/affinity/entropic.html#EntropicAffinity"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#torchdr.affinity.EntropicAffinity" title="Link to this definition"></a></dt>
<span class="sig-prename descclassname"><span class="pre">torchdr.affinity.</span></span><span class="sig-name descname"><span class="pre">EntropicAffinity</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">perplexity</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">30</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tol</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.001</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_iter</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1000</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sparsity</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">metric</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'euclidean'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">device</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">keops</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/torchdr/affinity/entropic.html#EntropicAffinity"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#torchdr.affinity.EntropicAffinity" title="Link to this definition"></a></dt>
<dd><p>Solves the directed entropic affinity problem introduced in <a class="reference internal" href="#r1333502c7ceb-1" id="id1">[1]</a>.
Corresponds to the matrix <span class="math notranslate nohighlight">\(\mathbf{P}^{\mathrm{e}}\)</span> in <a class="reference internal" href="#r1333502c7ceb-3" id="id2">[3]</a>, solving the convex optimization problem</p>
<div class="math notranslate nohighlight">
Expand Down
Loading

0 comments on commit 486f372

Please sign in to comment.