Skip to content

Commit

Permalink
document new example/dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayka committed Apr 24, 2021
1 parent 16f778b commit d720560
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 7 deletions.
7 changes: 7 additions & 0 deletions docs/_sources/datasets/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ Google Scholar
:noindex:


Academic interests
---------------------------------

.. autofunction:: pymde.datasets.google_scholar_interests
:noindex:


scRNA transcriptomes from COVID-19 patients
-------------------------------------------

Expand Down
11 changes: 10 additions & 1 deletion docs/_sources/examples/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ much longer than a minute, but it will take longer to compute on a CPU.

- `Google Scholar notebook <https://github.com/cvxgrp/pymde/blob/main/examples/google_scholar.ipynb>`_

Word Embedding of Academic Interests
------------------------------------
The academic interests notebook shows how to make basic word embeddings.
In this notebook the words being embedded are the 5000 most popular academic
interests on Google Scholar.

- `Word embedding notebook <https://github.com/cvxgrp/pymde/blob/main/examples/word_embedding.ipynb>`_


Population Genetics
-------------------
The population genetics notebook embeds genomic data of individuals thought
Expand Down Expand Up @@ -101,7 +110,7 @@ Drawing Graphs
--------------
PyMDE can be used to layout graphs in the Cartesian plane in an aesthetically
pleasing way. Compared to many other graph layout libraries, PyMDE can scale
to higher datasets. And, of course, PyMDE lets you design custom layouts, by
to much larger datasets. PyMDE also lets you design custom layouts, by
choosing your own distortion functions and constraints.

This notebook shows various ways of drawing graphs with PyMDE. It also
Expand Down
20 changes: 20 additions & 0 deletions docs/datasets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
<li class="toctree-l2"><a class="reference internal" href="#mnist">MNIST</a></li>
<li class="toctree-l2"><a class="reference internal" href="#fashion-mnist">Fashion MNIST</a></li>
<li class="toctree-l2"><a class="reference internal" href="#google-scholar">Google Scholar</a></li>
<li class="toctree-l2"><a class="reference internal" href="#academic-interests">Academic interests</a></li>
<li class="toctree-l2"><a class="reference internal" href="#scrna-transcriptomes-from-covid-19-patients">scRNA transcriptomes from COVID-19 patients</a></li>
<li class="toctree-l2"><a class="reference internal" href="#population-genetics">Population genetics</a></li>
<li class="toctree-l2"><a class="reference internal" href="#us-counties">US counties</a></li>
Expand Down Expand Up @@ -259,6 +260,25 @@ <h2>Google Scholar<a class="headerlink" href="#google-scholar" title="Permalink
</ul>
</dd></dl>

</div>
<div class="section" id="academic-interests">
<h2>Academic interests<a class="headerlink" href="#academic-interests" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt>
<code class="sig-prename descclassname">pymde.datasets.</code><code class="sig-name descname">google_scholar_interests</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">root</span><span class="o">=</span><span class="default_value">'./'</span></em>, <em class="sig-param"><span class="n">download</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="../api/index.html#pymde.datasets.Dataset" title="pymde.datasets.Dataset">pymde.datasets.Dataset</a></dt>
<dd><p>Google Scholar academic interests</p>
<p>This dataset contains a cooccurrence matrix of the 5000 most popular
academic interests listed by authors on Google Scholar</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">data</span></code>: a cooccurrence matrix, counting the number of times two
two interests appeared among a single author’s listed interests,
with <code class="docutils literal notranslate"><span class="pre">data[i,</span> <span class="pre">j]</span></code> giving the cooccurrence count of <code class="docutils literal notranslate"><span class="pre">interests[i]</span></code> and
<code class="docutils literal notranslate"><span class="pre">interests[j]</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">attributes</span></code>: one key, <code class="docutils literal notranslate"><span class="pre">interests</span></code>, where <code class="docutils literal notranslate"><span class="pre">interests[i]</span></code> is the
interest corresponding to the ith row/column of <code class="docutils literal notranslate"><span class="pre">data</span></code>.</p></li>
</ul>
</dd></dl>

</div>
<div class="section" id="scrna-transcriptomes-from-covid-19-patients">
<h2>scRNA transcriptomes from COVID-19 patients<a class="headerlink" href="#scrna-transcriptomes-from-covid-19-patients" title="Permalink to this headline"></a></h2>
Expand Down
12 changes: 11 additions & 1 deletion docs/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
<li class="toctree-l2"><a class="reference internal" href="#fashion-mnist">Fashion MNIST</a></li>
<li class="toctree-l2"><a class="reference internal" href="#single-cell-genomics">Single-Cell Genomics</a></li>
<li class="toctree-l2"><a class="reference internal" href="#google-scholar">Google Scholar</a></li>
<li class="toctree-l2"><a class="reference internal" href="#word-embedding-of-academic-interests">Word Embedding of Academic Interests</a></li>
<li class="toctree-l2"><a class="reference internal" href="#population-genetics">Population Genetics</a></li>
<li class="toctree-l2"><a class="reference internal" href="#us-counties">US Counties</a></li>
<li class="toctree-l2"><a class="reference internal" href="#dissimilar-edges-and-negative-weights">Dissimilar Edges and Negative Weights</a></li>
Expand Down Expand Up @@ -237,6 +238,15 @@
<li><p><a class="reference external" href="https://github.com/cvxgrp/pymde/blob/main/examples/google_scholar.ipynb">Google Scholar notebook</a></p></li>
</ul>
</div>
<div class="section" id="word-embedding-of-academic-interests">
<h2>Word Embedding of Academic Interests<a class="headerlink" href="#word-embedding-of-academic-interests" title="Permalink to this headline"></a></h2>
<p>The academic interests notebook shows how to make basic word embeddings.
In this notebook the words being embedded are the 5000 most popular academic
interests on Google Scholar.</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/cvxgrp/pymde/blob/main/examples/word_embedding.ipynb">Word embedding notebook</a></p></li>
</ul>
</div>
<div class="section" id="population-genetics">
<h2>Population Genetics<a class="headerlink" href="#population-genetics" title="Permalink to this headline"></a></h2>
<p>The population genetics notebook embeds genomic data of individuals thought
Expand Down Expand Up @@ -273,7 +283,7 @@ <h2>Dissimilar Edges and Negative Weights<a class="headerlink" href="#dissimilar
<span id="example-graphs"></span><h2>Drawing Graphs<a class="headerlink" href="#drawing-graphs" title="Permalink to this headline"></a></h2>
<p>PyMDE can be used to layout graphs in the Cartesian plane in an aesthetically
pleasing way. Compared to many other graph layout libraries, PyMDE can scale
to higher datasets. And, of course, PyMDE lets you design custom layouts, by
to much larger datasets. PyMDE also lets you design custom layouts, by
choosing your own distortion functions and constraints.</p>
<p>This notebook shows various ways of drawing graphs with PyMDE. It also
introduces the <code class="docutils literal notranslate"><span class="pre">pymde.Graph</span></code> class.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions docs_src/source/datasets/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ Google Scholar
:noindex:


Academic interests
---------------------------------

.. autofunction:: pymde.datasets.google_scholar_interests
:noindex:


scRNA transcriptomes from COVID-19 patients
-------------------------------------------

Expand Down
11 changes: 10 additions & 1 deletion docs_src/source/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ much longer than a minute, but it will take longer to compute on a CPU.

- `Google Scholar notebook <https://github.com/cvxgrp/pymde/blob/main/examples/google_scholar.ipynb>`_

Word Embedding of Academic Interests
------------------------------------
The academic interests notebook shows how to make basic word embeddings.
In this notebook the words being embedded are the 5000 most popular academic
interests on Google Scholar.

- `Word embedding notebook <https://github.com/cvxgrp/pymde/blob/main/examples/word_embedding.ipynb>`_


Population Genetics
-------------------
The population genetics notebook embeds genomic data of individuals thought
Expand Down Expand Up @@ -101,7 +110,7 @@ Drawing Graphs
--------------
PyMDE can be used to layout graphs in the Cartesian plane in an aesthetically
pleasing way. Compared to many other graph layout libraries, PyMDE can scale
to higher datasets. And, of course, PyMDE lets you design custom layouts, by
to much larger datasets. PyMDE also lets you design custom layouts, by
choosing your own distortion functions and constraints.

This notebook shows various ways of drawing graphs with PyMDE. It also
Expand Down
6 changes: 3 additions & 3 deletions pymde/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,9 @@ def google_scholar_interests(root="./", download=True) -> Dataset:
- ``data``: a cooccurrence matrix, counting the number of times two
two interests appeared among a single author's listed interests,
with data[i, j] giving the cooccurrence count of interests[i] and
interests[j]
- ``attributes``: one key, ``interests``, where interests[i] is the
with ``data[i, j]`` giving the cooccurrence count of ``interests[i]`` and
``interests[j]``
- ``attributes``: one key, ``interests``, where ``interests[i]`` is the
interest corresponding to the ith row/column of ``data``.
"""
root = os.path.expanduser(root)
Expand Down

0 comments on commit d720560

Please sign in to comment.