Skip to content

Commit

Permalink
CircleCI update of dev docs (139).
Browse files Browse the repository at this point in the history
  • Loading branch information
Circle CI committed Jun 7, 2024
1 parent 5f6f87a commit 5aca1fc
Show file tree
Hide file tree
Showing 40 changed files with 2,530 additions and 416 deletions.
Binary file not shown.
18 changes: 9 additions & 9 deletions dev/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<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/sg_gallery.css?v=61a4c737" />
<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" />


<!--[if lt IE 9]>
Expand Down Expand Up @@ -42,14 +46,8 @@
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../torchdr.overview.html">Overview of Dimensionality Reduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../torchdr.affinities.html">Affinities</a></li>
<li class="toctree-l1"><a class="reference internal" href="../torchdr.neighbor-embedding.html">Neighbor embedding algorithms</a></li>
<li class="toctree-l1"><a class="reference internal" href="../torchdr.notation.html">Math Notations</a></li>
</ul>

<!-- Local TOC -->
<div class="local-toc"></div>
</div>
</div>
</nav>
Expand All @@ -74,7 +72,9 @@
<div itemprop="articleBody">

<h1>All modules for which code is available</h1>
<ul><li><a href="torchdr/affinity/entropic.html">torchdr.affinity.entropic</a></li>
<ul><li><a href="torchdr/affinity/base.html">torchdr.affinity.base</a></li>
<li><a href="torchdr/affinity/entropic.html">torchdr.affinity.entropic</a></li>
<li><a href="torchdr/base.html">torchdr.base</a></li>
</ul>

</div>
Expand Down
266 changes: 266 additions & 0 deletions dev/_modules/torchdr/affinity/base.html

Large diffs are not rendered by default.

18 changes: 8 additions & 10 deletions dev/_modules/torchdr/affinity/entropic.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<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/sg_gallery.css?v=61a4c737" />
<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" />


<!--[if lt IE 9]>
Expand Down Expand Up @@ -42,14 +46,8 @@
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../torchdr.overview.html">Overview of Dimensionality Reduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../torchdr.affinities.html">Affinities</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../torchdr.neighbor-embedding.html">Neighbor embedding algorithms</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../torchdr.notation.html">Math Notations</a></li>
</ul>

<!-- Local TOC -->
<div class="local-toc"></div>
</div>
</div>
</nav>
Expand Down Expand Up @@ -233,7 +231,7 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> perplexity : float</span>
<span class="sd"> perplexity : float, optional</span>
<span class="sd"> Perplexity parameter, related to the number of &#39;effective&#39; nearest neighbors.</span>
<span class="sd"> Consider selecting a value between 2 and the number of samples.</span>
<span class="sd"> tol : float, optional</span>
Expand Down Expand Up @@ -307,7 +305,7 @@ <h1>Source code for torchdr.affinity.entropic</h1><div class="highlight"><pre>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> X : tensor of shape (n_samples, n_features)</span>
<span class="sd"> X : array-like of shape (n_samples, n_features)</span>
<span class="sd"> Data on which affinity is computed.</span>

<span class="sd"> Returns</span>
Expand Down
168 changes: 168 additions & 0 deletions dev/_modules/torchdr/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
<!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.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/sg_gallery.css?v=61a4c737" />
<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" />


<!--[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/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>

<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: white" >



<a href="../../index.html">

<img src="../../_static/torchdr_logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<!-- Local TOC -->
<div class="local-toc"></div>
</div>
</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" style="background: white" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">TorchDR</a>
</nav>

<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../index.html">Module code</a></li>
<li class="breadcrumb-item active">torchdr.base</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<h1>Source code for torchdr.base</h1><div class="highlight"><pre>
<span></span><span class="c1"># -*- coding: utf-8 -*-</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd">Base classes for DR methods</span>
<span class="sd">&quot;&quot;&quot;</span>

<span class="c1"># Author: Hugues Van Assel &lt;[email protected]&gt;</span>
<span class="c1">#</span>
<span class="c1"># License: BSD 3-Clause License</span>

<span class="kn">from</span> <span class="nn">abc</span> <span class="kn">import</span> <span class="n">ABC</span><span class="p">,</span> <span class="n">abstractmethod</span>
<span class="kn">from</span> <span class="nn">sklearn.base</span> <span class="kn">import</span> <span class="n">BaseEstimator</span><span class="p">,</span> <span class="n">TransformerMixin</span>

<span class="kn">from</span> <span class="nn">torchdr.utils</span> <span class="kn">import</span> <span class="n">to_torch</span>


<div class="viewcode-block" id="DRModule">
<a class="viewcode-back" href="../../stubs/torchdr.base.DRModule.html#torchdr.base.DRModule">[docs]</a>
<span class="k">class</span> <span class="nc">DRModule</span><span class="p">(</span><span class="n">TransformerMixin</span><span class="p">,</span> <span class="n">BaseEstimator</span><span class="p">,</span> <span class="n">ABC</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Base class for DR methods.</span>
<span class="sd"> Each children class should implement the fit method.</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">n_components</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span>
<span class="n">device</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">keops</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span>
<span class="n">verbose</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span>
<span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">n_components</span> <span class="o">=</span> <span class="n">n_components</span>
<span class="bp">self</span><span class="o">.</span><span class="n">device</span> <span class="o">=</span> <span class="n">device</span>
<span class="bp">self</span><span class="o">.</span><span class="n">keops</span> <span class="o">=</span> <span class="n">keops</span>
<span class="bp">self</span><span class="o">.</span><span class="n">verbose</span> <span class="o">=</span> <span class="n">verbose</span>

<span class="k">def</span> <span class="nf">_process_input</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="bp">self</span><span class="o">.</span><span class="n">data_</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">input_backend_</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">input_device_</span> <span class="o">=</span> <span class="n">to_torch</span><span class="p">(</span>
<span class="n">X</span><span class="p">,</span> <span class="n">device</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">device</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">verbose</span><span class="p">,</span> <span class="n">return_backend_device</span><span class="o">=</span><span class="kc">True</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">n_features_</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">data_</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
<span class="k">return</span> <span class="bp">self</span>

<span class="nd">@abstractmethod</span>
<span class="k">def</span> <span class="nf">fit</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">y</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Projects input data X onto a low-dimensional space.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> X : array-like object of shape (n_samples, n_features)</span>
<span class="sd"> or (n_samples, n_samples) if precomputed is True</span>
<span class="sd"> Input data or input affinity matrix if it is precomputed.</span>
<span class="sd"> y : None</span>
<span class="sd"> Ignored.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> self : object</span>
<span class="sd"> Fitted Estimator.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">verbose</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;[TorchDR] Fitting DR model ...&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span></div>

</pre></div>

</div>
</div>
<footer>

<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2024, TorchDR team.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>

</body>
</html>
32 changes: 32 additions & 0 deletions dev/_sources/auto_examples/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
:orphan:




.. raw:: html

<div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open
.. thumbnail-parent-div-close
.. raw:: html

</div>


.. only:: html

.. container:: sphx-glr-footer sphx-glr-footer-gallery

.. container:: sphx-glr-download sphx-glr-download-python

:download:`Download all examples in Python source code: auto_examples_python.zip </auto_examples/auto_examples_python.zip>`


.. only:: html

.. rst-class:: sphx-glr-signature

`Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
37 changes: 37 additions & 0 deletions dev/_sources/auto_examples/sg_execution_times.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

:orphan:

.. _sphx_glr_auto_examples_sg_execution_times:


Computation times
=================
**00:00.000** total execution time for 0 files **from auto_examples**:

.. container::

.. raw:: html

<style scoped>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://cdn.datatables.net/1.13.6/css/dataTables.bootstrap5.min.css" rel="stylesheet" />
</style>
<script src="https://code.jquery.com/jquery-3.7.0.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/dataTables.bootstrap5.min.js"></script>
<script type="text/javascript" class="init">
$(document).ready( function () {
$('table.sg-datatable').DataTable({order: [[1, 'desc']]});
} );
</script>

.. list-table::
:header-rows: 1
:class: table table-striped sg-datatable

* - Example
- Time
- Mem (MB)
* - N/A
- N/A
- N/A
29 changes: 1 addition & 28 deletions dev/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1 @@
TorchDR: a Pytorch library for dimensionality reduction
==================================================================


Github repository: `<https://github.com/torchdr/torchdr>`_.

**TorchDR** provides a simple unified framework for :ref:`dimensionality reduction <overview>` methods.

The library offers:

* A large collection of :ref:`affinity matrices <affinities>`.
* A simple and unified interface for :ref:`neighbor embedding <neighbor-embedding>` methods.


.. toctree::
:maxdepth: 1
:caption: Contents

torchdr.overview
torchdr.affinities
torchdr.neighbor-embedding
torchdr.notation


Finding Help
==================
If you have any questions or suggestions, feel free to open an issue on the
`issue tracker <https://github.com/torchdr/torchdr/issues>`_ or contact `Hugues Van Assel <https://huguesva.github.io/>`_ directly.
.. include:: ../../README.rst
37 changes: 37 additions & 0 deletions dev/_sources/sg_execution_times.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

:orphan:

.. _sphx_glr_sg_execution_times:


Computation times
=================
**00:00.000** total execution time for 0 files **from all galleries**:

.. container::

.. raw:: html

<style scoped>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://cdn.datatables.net/1.13.6/css/dataTables.bootstrap5.min.css" rel="stylesheet" />
</style>
<script src="https://code.jquery.com/jquery-3.7.0.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/dataTables.bootstrap5.min.js"></script>
<script type="text/javascript" class="init">
$(document).ready( function () {
$('table.sg-datatable').DataTable({order: [[1, 'desc']]});
} );
</script>

.. list-table::
:header-rows: 1
:class: table table-striped sg-datatable

* - Example
- Time
- Mem (MB)
* - N/A
- N/A
- N/A
Loading

0 comments on commit 5aca1fc

Please sign in to comment.