Skip to content

Commit 541f1a6

Browse files
Update documentation (#31)
* Add an API Reference * Add google analytics tracking to docs * Streamline README.rst for github * Add install to toctree * Update dendrogram docstrings * Add captions for different sections
1 parent acc50cd commit 541f1a6

File tree

8 files changed

+164
-62
lines changed

8 files changed

+164
-62
lines changed

README.rst

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ learning with ``henchman.selection`` and
2020

2121
For more information, visit the Henchman `documentation <https://henchman.featurelabs.com>`_.
2222

23+
24+
2325
Why?
2426
~~~~~~~
2527
Life is full of reusable functions. Here's what separates
@@ -28,20 +30,16 @@ Henchman:
2830
- **Easy Interactive Plotting**: We bypass the flexible Bokeh
2931
API in favor of a small, rigid collection of standard data
3032
analysis plots. With sliders and checkboxes, finding the
31-
right plot parameters is as easy as a single function call.
33+
right plot parameters can be done with a `single function call <https://henchman.featurelabs.com/plotting_gallery.html>`_.
3234

33-
.. image:: http://henchman.featurelabs.com/_images/piechart.gif
34-
:width: 47%
35-
:height: 300px
36-
.. image:: http://henchman.featurelabs.com/_images/histogram.gif
37-
:width: 47%
38-
:height: 300px
35+
.. image:: https://henchman.featurelabs.com/_images/timeseries.gif
36+
:align: center
3937

4038
- **Memorable API, Extensive documentation**: We have a
4139
heavy emphasis on ease of use. That means all the
4240
functions are sorted into one of 4 semantically named
4341
modules and names should be easy to remember inside that
44-
module. On top of that, every function has a docstring, an
42+
module. Additionally, every function has a docstring, an
4543
example and a `documentation <https://henchman.featurelabs.com>`_
4644
page.
4745

@@ -52,20 +50,9 @@ Henchman:
5250
- **Novel Functionality**: We provide a few functions built
5351
from scratch to add to your data science workflow. There
5452
are methods to systematically find dataset attributes with
55-
``overview`` and ``warnings`` from `henchman.diagnostics` and classes to
56-
select features in novel ways with ``RandomSelect`` and
57-
``Dendrogram`` in `henchman.selection`.
58-
59-
.. image:: http://henchman.featurelabs.com/_images/overview.png
60-
:width: 47%
61-
:height: 300px
62-
.. image:: http://henchman.featurelabs.com/_images/warnings.png
63-
:width: 47%
64-
:height: 300px
65-
66-
.. image:: http://henchman.featurelabs.com/_images/dendrogram.gif
67-
:align: center
68-
53+
`overview <https://henchman.featurelabs.com/documentation.html#diagnostics>`_ and `warnings <https://henchman.featurelabs.com/generated/henchman.diagnostics.warnings.html>`_ from ``henchman.diagnostics`` and classes to
54+
select features in novel ways with `RandomSelect <https://henchman.featurelabs.com/documentation.html#selection>`_ and
55+
`Dendrogram <https://henchman.featurelabs.com/generated/henchman.selection.Dendrogram.html>`_ in ``henchman.selection``.
6956

7057

7158
Install
@@ -82,11 +69,10 @@ If you are using conda, you can download the most recent build from our channel
8269
8370
$ conda install -c featurelabs henchman
8471
85-
These are the preferred methods to install Henchman, as it will always install the most recent stable release. If you don't have `pip`_ installed, this `Python installation guide`_ can guide
86-
you through the process.
72+
These are the preferred methods to install Henchman, as it will always install the most recent stable release. You can download miniconda `from this page`_.
73+
74+
.. _from this page: https://github.com/conda/conda
8775

88-
.. _pip: https://pip.pypa.io
89-
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
9076

9177
The sources for Henchman can be downloaded from the `Github repo`_.
9278

@@ -108,7 +94,6 @@ Once you have a copy of the source, you can install it with:
10894
10995
$ python setup.py install
11096
111-
11297
.. _Github repo: https://github.com/featurelabs/henchman
11398
.. _tarball: https://github.com/featurelabs/henchman/tarball/master
11499

docs/_source/api_ref.rst

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
.. _api_ref:
2+
3+
API Reference
4+
===============
5+
6+
Diagnostics API
7+
~~~~~~~~~~~~~~~~
8+
9+
.. currentmodule:: henchman.diagnostics
10+
11+
.. autosummary::
12+
:toctree: generated/
13+
14+
overview
15+
warnings
16+
column_report
17+
profile
18+
19+
20+
Selection API
21+
~~~~~~~~~~~~~~
22+
23+
.. currentmodule:: henchman.selection
24+
25+
26+
.. autosummary::
27+
:toctree: generated/
28+
29+
RandomSelect
30+
Dendrogram
31+
Dendrogram.fit
32+
Dendrogram.transform
33+
Dendrogram.set_params
34+
Dendrogram.features_at_step
35+
Dendrogram.find_set_of_size
36+
Dendrogram.score_at_point
37+
Dendrogram.shuffle_score_at_point
38+
39+
Learning API
40+
~~~~~~~~~~~~~~
41+
42+
.. currentmodule:: henchman.learning
43+
44+
45+
.. autosummary::
46+
:toctree: generated/
47+
48+
create_model
49+
inplace_encoder
50+
feature_importances
51+
create_holdout
52+
53+
Plotting API
54+
~~~~~~~~~~~~~
55+
56+
.. currentmodule:: henchman.plotting
57+
58+
59+
.. autosummary::
60+
:toctree: generated/
61+
62+
show
63+
show_template
64+
piechart
65+
histogram
66+
timeseries
67+
scatter
68+
dendrogram
69+
feature_importances
70+
roc_auc
71+
f1
72+

docs/_source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
# Usually you set "language" from the command line for these cases.
7676
language = None
7777

78-
autosummary_generate = ["documentation.rst", "generated/henchman.selection.Dendrogram.rst"]
78+
autosummary_generate = ["api_ref.rst"]
7979

8080
# List of patterns, relative to source directory, that match files and
8181
# directories to ignore when looking for source files.

docs/_source/documentation.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
.. _api_ref:
1+
.. _documentation:
22

3-
Documentation
4-
=============
53
The ``Henchman`` package has reusable functionality in four areas:
64
`dataframe diagnostics <#diagnostics>`_, `feature selection
75
<#selection>`_, `machine learning <#learning>`_ and `bokeh plotting <#plotting>`_.
@@ -23,7 +21,7 @@ We'll load in the csv using pandas.
2321
.. _diagnostics:
2422

2523
Diagnostics
26-
~~~~~~~~~~~
24+
============
2725
It can sometimes be hard to find information about a dataframe by inspection.
2826
Frequent questions such as "how large is this dataframe" and "are there duplicates"
2927
usually require copying code from one notebook to another. In this module, we give easy
@@ -87,7 +85,7 @@ about every column in the dataframe.
8785
.. _selection:
8886

8987
Selection
90-
~~~~~~~~~
88+
==========
9189

9290
There are some lightweight feature selection packages
9391
provided as well. There is
@@ -147,7 +145,7 @@ can be shuffled to return a similarly connected feature set.
147145
.. _learning:
148146

149147
Learning
150-
~~~~~~~~
148+
==========
151149
The learning module exists to simplify some frequent machine
152150
learning calls. For instance, given a feature matrix ``X``
153151
and a column of labels ``y``, it's nice to be able to
@@ -184,10 +182,11 @@ We can check :func:`feature importances
184182
feature_importances
185183
create_holdout
186184

185+
187186
.. _plotting:
188187

189188
Plotting
190-
~~~~~~~~~
189+
=========
191190

192191
The plotting module gives a collection of useful dataset
193192
agnostic plots. Plots have the ability to be *dynamic* or

docs/_source/index.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
.. include:: readme.rst
22

33
.. toctree::
4-
:maxdepth: 2
5-
:caption: Contents:
4+
:caption: Overview
5+
:titlesonly:
66

77
readme
8-
documentation
98
plotting_gallery
9+
10+
.. toctree::
11+
:caption: Documentation
12+
:maxdepth: 2
13+
14+
documentation
15+
16+
.. toctree::
17+
:caption: Reference
18+
1019
contributing
1120
authors
21+
api_ref
1222

1323
Indices and tables
1424
==================

docs/_source/readme.rst

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
Welcome to Henchman!
2-
=====================
3-
Henchman is a collection of open source python
4-
utility functions for working in a jupyter notebook. With
5-
Henchman, you can rapidly prototype end-to-end data science
6-
workflows. You can explore data with
7-
:ref:`diagnostics`, make interesting plots with
8-
:ref:`plotting`, and do feature selection and machine
9-
learning with :ref:`selection` and
1+
Welcome to Henchman!
2+
=====================
3+
4+
Henchman is a collection of `open source
5+
<https://github.com/featurelabs/henchman>`_ python utility
6+
functions for working in a jupyter notebook. With Henchman,
7+
you can rapidly prototype end-to-end data science workflows.
8+
You can explore data with :ref:`diagnostics`, make
9+
interesting plots with :ref:`plotting`, and do feature
10+
selection and machine learning with :ref:`selection` and
1011
:ref:`learning`.
1112

1213
Why?
13-
~~~~~~~
14+
~~~~~
15+
1416
Life is full of reusable functions. Here's what separates
1517
Henchman:
1618

@@ -30,11 +32,12 @@ Henchman:
3032
:height: 400px
3133
:align: center
3234

33-
- **Memorable API, Extensive documentation**: We have a heavy
34-
emphasis on ease of use. That means all the functions are
35-
sorted into one of 4 semantically named modules and names
36-
should be easy to remember inside that module. On top of
37-
that, every function has a docstring, an example and a documentation page.
35+
- **Memorable API, Extensive documentation**: We have a
36+
heavy emphasis on ease of use. That means all the
37+
functions are sorted into one of 4 semantically named
38+
modules and names should be easy to remember inside that
39+
module. Additionally, every function has a docstring, an
40+
example and a documentation page.
3841

3942
.. image:: img/create_model_docs.png
4043
:width: 75%
@@ -60,7 +63,7 @@ Henchman:
6063

6164

6265
Install
63-
~~~~~~~~~
66+
========
6467
To install Henchman, run this command in your terminal:
6568

6669
.. code-block:: console
@@ -73,11 +76,10 @@ If you are using conda, you can download the most recent build from our channel
7376
7477
$ conda install -c featurelabs henchman
7578
76-
These are the preferred methods to install Henchman, as it will always install the most recent stable release. If you don't have `pip`_ installed, this `Python installation guide`_ can guide
77-
you through the process.
79+
These are the preferred methods to install Henchman, as it will always install the most recent stable release. You can download miniconda `from this page`_.
80+
81+
.. _from this page: https://github.com/conda/conda
7882

79-
.. _pip: https://pip.pypa.io
80-
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
8183

8284
The sources for Henchman can be downloaded from the `Github repo`_.
8385

docs/_source/templates/layout.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{% extends "!layout.html" %}
2+
{% set css_files = css_files + ['_static/style.css'] %}
3+
4+
{%- block extrahead %}
5+
<script>
6+
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t,e){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="https://cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(n,a);analytics._loadOptions=e};analytics.SNIPPET_VERSION="4.1.0";
7+
analytics.load("OIv3wkryIhVtrOQJCHicFvpNgmLGtr0o");
8+
analytics.page();
9+
}}();
10+
</script>
11+
{% endblock %}

0 commit comments

Comments
 (0)