Skip to content

Commit

Permalink
CircleCI update of dev docs (448).
Browse files Browse the repository at this point in the history
  • Loading branch information
Circle CI committed Dec 11, 2024
1 parent 7c3fdc6 commit 5f93999
Show file tree
Hide file tree
Showing 129 changed files with 1,166 additions and 1,099 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file modified dev/_images/sphx_glr_demo_ea_adaptivity_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_demo_ea_adaptivity_002.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_demo_ne_methods_affinity_matcher_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_demo_ne_methods_affinity_matcher_002.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_demo_pca_via_affinity_matcher_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_demo_pca_via_affinity_matcher_002.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_demo_tsne_swiss_roll_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_demo_tsne_swiss_roll_002.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_demo_tsne_swiss_roll_003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 8 additions & 10 deletions dev/_modules/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@


<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &mdash; TorchDR 0.0.0-alpha documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=e59714d7" />
<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" />
<link rel="stylesheet" type="text/css" href="../_static/sg_gallery-dataframe.css?v=2082cf3c" />
<link rel="stylesheet" type="text/css" href="../_static/sg_gallery-rendered-html.css?v=1277b6f3" />


<link rel="shortcut icon" href="../_static/logo.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=8e37ee27"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=8e37ee27"></script>
<script src="../_static/doctools.js?v=9bcbadda"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
Expand Down
18 changes: 8 additions & 10 deletions dev/_modules/torchdr/affinity/base.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@


<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>torchdr.affinity.base &mdash; TorchDR 0.0.0-alpha documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=e59714d7" />
<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" />
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery-dataframe.css?v=2082cf3c" />
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery-rendered-html.css?v=1277b6f3" />


<link rel="shortcut icon" href="../../../_static/logo.ico"/>
<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=8e37ee27"></script>
<script src="../../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=8e37ee27"></script>
<script src="../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
Expand Down
54 changes: 26 additions & 28 deletions dev/_modules/torchdr/affinity/entropic.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@


<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>torchdr.affinity.entropic &mdash; TorchDR 0.0.0-alpha documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=e59714d7" />
<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" />
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery-dataframe.css?v=2082cf3c" />
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery-rendered-html.css?v=1277b6f3" />


<link rel="shortcut icon" href="../../../_static/logo.ico"/>
<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=8e37ee27"></script>
<script src="../../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=8e37ee27"></script>
<script src="../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
Expand Down Expand Up @@ -187,7 +185,7 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>


<span class="k">def</span> <span class="nf">_bounds_entropic_affinity</span><span class="p">(</span><span class="n">C</span><span class="p">,</span> <span class="n">perplexity</span><span class="p">):</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Compute the bounds derived in [4]_ for the entropic affinity root.</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Compute the bounds derived in [V13]_ for the entropic affinity root.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
Expand All @@ -206,7 +204,7 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>

<span class="sd"> References</span>
<span class="sd"> ----------</span>
<span class="sd"> .. [4] Max Vladymyrov, Miguel A. Carreira-Perpinan (2013).</span>
<span class="sd"> .. [V13] Max Vladymyrov, Miguel A. Carreira-Perpinan (2013).</span>
<span class="sd"> Entropic Affinities: Properties and Efficient Numerical Computation.</span>
<span class="sd"> International Conference on Machine Learning (ICML).</span>
<span class="sd"> &quot;&quot;&quot;</span>
Expand Down Expand Up @@ -272,7 +270,7 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>
<div class="viewcode-block" id="EntropicAffinity">
<a class="viewcode-back" href="../../../gen_modules/torchdr.EntropicAffinity.html#torchdr.EntropicAffinity">[docs]</a>
<span class="k">class</span> <span class="nc">EntropicAffinity</span><span class="p">(</span><span class="n">SparseLogAffinity</span><span class="p">):</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Solve the directed entropic affinity problem introduced in [1]_.</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Solve the directed entropic affinity problem introduced in [H02]_.</span>

<span class="sd"> The algorithm computes the optimal dual variable</span>
<span class="sd"> :math:`\mathbf{\varepsilon}^* \in \mathbb{R}^n_{&gt;0}` such that</span>
Expand All @@ -290,7 +288,7 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>
<span class="sd"> since rows of :math:`\mathbf{P}^{\mathrm{e}}` are independent subproblems.</span>

<span class="sd"> **Convex problem.** Corresponds to the matrix :math:`\mathbf{P}^{\mathrm{e}}`</span>
<span class="sd"> in [3]_, solving the convex optimization problem</span>
<span class="sd"> in [V23]_, solving the convex optimization problem</span>

<span class="sd"> .. math::</span>
<span class="sd"> \mathbf{P}^{\mathrm{e}} \in \mathop{\arg\min}_{\mathbf{P} \in \mathbb{R}_+^{n \times n}} \: &amp;\langle \mathbf{C}, \mathbf{P} \rangle \\</span>
Expand All @@ -311,7 +309,7 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>

<span class="sd"> .. note:: A symmetric version is also available at</span>
<span class="sd"> :class:`~torchdr.SymmetricEntropicAffinity`. It is the affinity matrix</span>
<span class="sd"> used in :class:`~SNEkhorn`/ :class:`~TSNEkhorn` [3]_. In TSNE [2]_,</span>
<span class="sd"> used in :class:`~SNEkhorn`/ :class:`~TSNEkhorn` [V23]_. In TSNE [V08]_,</span>
<span class="sd"> the entropic affinity is simply averaged with its transpose.</span>

<span class="sd"> Parameters</span>
Expand Down Expand Up @@ -339,15 +337,15 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>

<span class="sd"> References</span>
<span class="sd"> ----------</span>
<span class="sd"> .. [1] Geoffrey Hinton, Sam Roweis (2002).</span>
<span class="sd"> .. [H02] Geoffrey Hinton, Sam Roweis (2002).</span>
<span class="sd"> Stochastic Neighbor Embedding.</span>
<span class="sd"> Advances in neural information processing systems 15 (NeurIPS).</span>

<span class="sd"> .. [2] Laurens van der Maaten, Geoffrey Hinton (2008).</span>
<span class="sd"> .. [V08] Laurens van der Maaten, Geoffrey Hinton (2008).</span>
<span class="sd"> Visualizing Data using t-SNE.</span>
<span class="sd"> The Journal of Machine Learning Research 9.11 (JMLR).</span>

<span class="sd"> .. [3] Hugues Van Assel, Titouan Vayer, Rémi Flamary, Nicolas Courty (2023).</span>
<span class="sd"> .. [V23] Hugues Van Assel, Titouan Vayer, Rémi Flamary, Nicolas Courty (2023).</span>
<span class="sd"> SNEkhorn: Dimension Reduction with Symmetric Entropic Affinities.</span>
<span class="sd"> Advances in Neural Information Processing Systems 36 (NeurIPS).</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="c1"># noqa: E501</span>
Expand Down Expand Up @@ -390,7 +388,7 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="kc">False</span>

<span class="k">def</span> <span class="nf">_compute_sparse_log_affinity</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">X</span><span class="p">:</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">):</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Solve the problem (EA) in [1]_ to compute the entropic affinity matrix.</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Solve the problem (EA) in [H02]_ to compute the entropic affinity matrix.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
Expand Down Expand Up @@ -466,7 +464,7 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>
<div class="viewcode-block" id="SymmetricEntropicAffinity">
<a class="viewcode-back" href="../../../gen_modules/torchdr.SymmetricEntropicAffinity.html#torchdr.SymmetricEntropicAffinity">[docs]</a>
<span class="k">class</span> <span class="nc">SymmetricEntropicAffinity</span><span class="p">(</span><span class="n">LogAffinity</span><span class="p">):</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Compute the symmetric entropic affinity (SEA) introduced in [3]_.</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Compute the symmetric entropic affinity (SEA) introduced in [V23]_.</span>

<span class="sd"> Compute the solution :math:`\mathbf{P}^{\mathrm{se}}` to the symmetric entropic</span>
<span class="sd"> affinity (SEA) problem described in [3]_.</span>
Expand Down Expand Up @@ -537,7 +535,7 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>

<span class="sd"> References</span>
<span class="sd"> ----------</span>
<span class="sd"> .. [3] SNEkhorn: Dimension Reduction with Symmetric Entropic Affinities,</span>
<span class="sd"> .. [V23] SNEkhorn: Dimension Reduction with Symmetric Entropic Affinities,</span>
<span class="sd"> Hugues Van Assel, Titouan Vayer, Rémi Flamary, Nicolas Courty, NeurIPS 2023.</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="c1"># noqa: E501</span>

Expand Down Expand Up @@ -572,7 +570,7 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">eps_square</span> <span class="o">=</span> <span class="n">eps_square</span>

<span class="k">def</span> <span class="nf">_compute_log_affinity</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">X</span><span class="p">:</span> <span class="n">torch</span><span class="o">.</span><span class="n">Tensor</span><span class="p">):</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Solve the problem (SEA) in [3]_.</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Solve the problem (SEA) in [V23]_.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
Expand Down Expand Up @@ -730,7 +728,7 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Compute the symmetric doubly stochastic affinity matrix.</span>

<span class="sd"> The algorithm computes the doubly stochastic matrix :math:`\mathbf{P}^{\mathrm{ds}}`</span>
<span class="sd"> with controlled global entropy using the symmetric Sinkhorn algorithm [5]_.</span>
<span class="sd"> with controlled global entropy using the symmetric Sinkhorn algorithm [S67]_.</span>

<span class="sd"> The algorithm computes the optimal dual variable</span>
<span class="sd"> :math:`\mathbf{f}^\star \in \mathbb{R}^n` such that</span>
Expand All @@ -744,9 +742,9 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>
<span class="sd"> - :math:`\varepsilon`: entropic regularization parameter.</span>
<span class="sd"> - :math:`\mathbf{1} := (1,...,1)^\top`: all-ones vector.</span>

<span class="sd"> :math:`\mathbf{f}^\star` is computed by performing dual ascent via the Sinkhorn fixed-point iteration (eq. 25 in [7]_).</span>
<span class="sd"> :math:`\mathbf{f}^\star` is computed by performing dual ascent via the Sinkhorn fixed-point iteration (eq. 25 in [F19]_).</span>

<span class="sd"> **Convex problem.** Consists in solving the following symmetric entropic optimal transport problem [6]_:</span>
<span class="sd"> **Convex problem.** Consists in solving the following symmetric entropic optimal transport problem [C13]_:</span>

<span class="sd"> .. math::</span>
<span class="sd"> \mathbf{P}^{\mathrm{ds}} \in \mathop{\arg\min}_{\mathbf{P} \in \mathcal{DS}} \: \langle \mathbf{C}, \mathbf{P} \rangle + \varepsilon \mathrm{H}(\mathbf{P})</span>
Expand Down Expand Up @@ -796,15 +794,15 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>

<span class="sd"> References</span>
<span class="sd"> ----------</span>
<span class="sd"> .. [5] Richard Sinkhorn, Paul Knopp (1967).</span>
<span class="sd"> .. [S67] Richard Sinkhorn, Paul Knopp (1967).</span>
<span class="sd"> Concerning nonnegative matrices and doubly stochastic matrices.</span>
<span class="sd"> Pacific Journal of Mathematics, 21(2), 343-348.</span>

<span class="sd"> .. [6] Marco Cuturi (2013).</span>
<span class="sd"> .. [C13] Marco Cuturi (2013).</span>
<span class="sd"> Sinkhorn Distances: Lightspeed Computation of Optimal Transport.</span>
<span class="sd"> Advances in Neural Information Processing Systems 26 (NeurIPS).</span>

<span class="sd"> .. [7] Jean Feydy, Thibault Séjourné, François-Xavier Vialard, Shun-ichi Amari,</span>
<span class="sd"> .. [F19] Jean Feydy, Thibault Séjourné, François-Xavier Vialard, Shun-ichi Amari,</span>
<span class="sd"> Alain Trouvé, Gabriel Peyré (2019).</span>
<span class="sd"> Interpolating between Optimal Transport and MMD using Sinkhorn Divergences.</span>
<span class="sd"> International Conference on Artificial Intelligence and Statistics</span>
Expand Down
Loading

0 comments on commit 5f93999

Please sign in to comment.