Skip to content

Commit

Permalink
More fixes addressing Sphinx warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Riddell committed Mar 30, 2015
1 parent 774a05c commit 28f5d57
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 485 deletions.
3 changes: 3 additions & 0 deletions source/case_study_racine.rst
Expand Up @@ -34,6 +34,7 @@ words may be calculated by summing the rows of the document-term matrix, as each
row corresponds to one document.

.. ipython:: python
:okwarning:
import os
Expand Down Expand Up @@ -259,6 +260,8 @@ the component values associated with each document sum to one.

.. ipython:: python
# to avoid division by 0 (not a problem with LDA) we add a tiny value to each cell.
doctopic_chunks += 1e-6 # 1e-6 is the same as 0.000001
doctopic_chunks = doctopic_chunks / np.sum(doctopic_chunks, axis=1, keepdims=True)
As we did in :ref:`previous sections <topic-model-mallet>`, we will aggregate
Expand Down
3 changes: 2 additions & 1 deletion source/datasets.rst
Expand Up @@ -15,7 +15,8 @@
import shutil
import subprocess
subprocess.check_call('zip -r -u source/datasets.zip data/french-tragedies-and-comedies/ data/french-tragedies-and-comedies-split/ data/french-tragedy data/french-tragedy-split data/french-plays data/austen-brontë data/austen-brontë-split data/stopwords/ data/british-fiction-corpus data/hugo-les-misérables data/hugo-les-misérables-original data/hugo-les-misérables-split', shell=True)
# NOTE: zip returns an exit code 12 if everything is up-to-date
subprocess.check_call('zip -q -r -u source/datasets.zip data/french-tragedies-and-comedies/ data/french-tragedies-and-comedies-split/ data/french-tragedy data/french-tragedy-split data/french-plays data/austen-brontë data/austen-brontë-split data/stopwords/ data/british-fiction-corpus data/hugo-les-misérables data/hugo-les-misérables-original data/hugo-les-misérables-split', shell=True)
Expand Down
3 changes: 0 additions & 3 deletions source/index.rst
Expand Up @@ -37,9 +37,6 @@ Contents
datasets
references

.. unfinished drafts:
predicting_frequencies
.. figure:: _static/plot_doctopic_heatmap.png
:scale: 60 %
:alt: Heatmap of topic shares in the ``austen-brontë`` corpus. See :ref:`topic_model_visualization`.
Expand Down

0 comments on commit 28f5d57

Please sign in to comment.