Skip to content

Commit

Permalink
version bump to 0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bbengfort committed Jan 20, 2017
1 parent dc02e59 commit 1ad9776
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 52 deletions.
37 changes: 30 additions & 7 deletions docs/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,33 @@ From Wikipedia_:

Changelog
---------
Hardened the Yellowbrick API to elevate the idea of a Visualizer to a first principle. This included reconciling shifts in the development of the preliminary versions to the new API, formalizing Visualizer methods like `draw()` and `finalize()`, and adding utilities that revolve around Scikit-Learn. To that end we also performed administrative tasks like refreshing the documentation and preparing the repository for more and varied open source contributions.

Version 0.3.2
^^^^^^^^^^^^^

* Tag: v0.3.2_
* Deployed: Friday, January 20, 2017
* Contributors: Benjamin Bengfort, Rebecca Bilbro

Changes:
- Converted Mkdocs documentation to Sphinx documentation
- Updated docstrings for all Visualizers and functions
- Created a DataVisualizer base class for dataset visualization
- Single call functions for simple visualizer interaction
- Added yellowbrick specific color sequences and palettes and env handling
- More robust examples with downloader from DDL host
- Better axes handling in visualizer, matplotlib/sklearn integration
- Added a finalize method to complete drawing before render
- Improved testing on real data sets from examples
- Bugfix: score visualizer renders in notebook but not in Python scripts.
- Bugfix: tests updated to support new API

Hotfix 0.3.1
^^^^^^^^^^^^
Hotfix to solve pip install issues with Yellowbrick.

* Tag: v0.3.1
* Tag: v0.3.1_
* Deployed: Monday, October 10, 2016
* Contributors: Benjamin Bengfort

Expand All @@ -103,7 +124,7 @@ This release marks a major change from the previous MVP releases as Yellowbrick

In this release specifically we focused on visualizers in the data space for feature analysis and visualizers in the model space for scoring and evaluating models. Future releases will extend these base classes and add more functionality.

* Tag: v0.3
* Tag: v0.3_
* Deployed: Sunday, October 9, 2016
* Contributors: Benjamin Bengfort, Rebecca Bilbro, Marius van Niekerk

Expand Down Expand Up @@ -134,7 +155,7 @@ Version 0.2
^^^^^^^^^^^
Intermediate steps towards a complete API for visualization. Preparatory stages for Scikit-Learn visual pipelines.

* Tag: v0.2
* Tag: v0.2_
* Deployed: Sunday, September 4, 2016
* Contributors: Benjamin Bengfort, Rebecca Bilbro, Patrick O'Melveny, Ellen Lowy, Laura Lorenz

Expand All @@ -157,7 +178,7 @@ Version 0.1
^^^^^^^^^^^
Created the yellowbrick library MVP with two primary operations: a classification report heat map and a ROC/AUC curve model analysis for classifiers. This is the base package deployment for continuing yellowbrick development.

* Tag: v0.1
* Tag: v0.1_
* Deployed: Wednesday, May 18, 2016
* Contributors: Benjamin Bengfort, Rebecca Bilbro

Expand All @@ -169,10 +190,12 @@ Created the yellowbrick library MVP with two primary operations: a classificatio
- Stub tests/stub documentation





.. _SIGMOD: http://cseweb.ucsd.edu/~arunkk/vision/SIGMODRecord15.pdf
.. _cycle: http://nvie.com/posts/a-successful-git-branching-model/
.. _board: https://waffle.io/districtdatalabs/yellowbrick
.. _Wikipedia: https://en.wikipedia.org/wiki/Yellow_brick_road
.. _v0.3.2: https://github.com/DistrictDataLabs/yellowbrick/releases/tag/v0.3.2
.. _v0.3.1: https://github.com/DistrictDataLabs/yellowbrick/releases/tag/v0.3.1a2
.. _v0.3: https://github.com/DistrictDataLabs/yellowbrick/releases/tag/v0.3
.. _v0.2: https://github.com/DistrictDataLabs/yellowbrick/releases/tag/v0.2
.. _v0.1: https://github.com/DistrictDataLabs/yellowbrick/releases/tag/v0.1
8 changes: 4 additions & 4 deletions docs/api/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ API Reference
==============

.. toctree::
:maxdepth: 4
:maxdepth: 4

yellowbrick
yellowbrick.style
yellowbrick.features
yellowbrick
yellowbrick.style
yellowbrick.features
10 changes: 5 additions & 5 deletions docs/api/yellowbrick.features.rst
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
yellowbrick.features package
===================
============================

Submodules
----------

yellowbrick.features.base module
---------------------------
--------------------------------

.. automodule:: yellowbrick.features.base
:members:
:undoc-members:
:show-inheritance:

yellowbrick.features.pcoords module
---------------------------
-----------------------------------

.. automodule:: yellowbrick.features.pcoords
:members:
:undoc-members:
:show-inheritance:

yellowbrick.features.radviz module
---------------------------
----------------------------------

.. automodule:: yellowbrick.features.radviz
:members:
:undoc-members:
:show-inheritance:

yellowbrick.features.rankd module
---------------------------
---------------------------------

.. automodule:: yellowbrick.features.rankd
:members:
Expand Down
4 changes: 2 additions & 2 deletions docs/api/yellowbrick.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ yellowbrick.base module
:show-inheritance:

yellowbrick.bestfit module
-----------------------
--------------------------

.. automodule:: yellowbrick.bestfit
:members:
Expand Down Expand Up @@ -60,7 +60,7 @@ yellowbrick.regressor module
:members:
:undoc-members:
:show-inheritance:

yellowbrick.utils module
------------------------

Expand Down
9 changes: 8 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.todo',
'numpydoc',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -340,11 +343,15 @@
#
# texinfo_no_detailmenu = False

# Autodoc requires numpy to skip class members otherwise we get an exception:
# toctree contains reference to nonexisting document
# See: https://github.com/phn/pytpm/issues/3#issuecomment-12133978
numpydoc_show_class_members = False

# Locations of objects.inv files for intersphinx extension that auto links to external api docs.
intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
'matplotlib': ('http://matplotlib.org/', None),
'scipy': ('http://scipy.github.io/devdocs/', None),
'numpy': ('https://docs.scipy.org/doc/numpy-dev/', None),
'cycler': ('http://matplotlib.org/cycler/', None),
'seaborn': ('http://seaborn.pydata.org/index.html', None)}
'sklearn': ('http://scikit-learn.org/stable/', None)}
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ cycler>=0.10.0
## Documentation (uncomment to build documentation)
#Sphinx>=1.4.4
#sphinx-rtd-theme>=0.1.9
#numpydoc>=0.6.0

## Documentation Dependencies (installed from above)
#alabaster==0.7.9
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
## Test Constants
##########################################################################

EXPECTED_VERSION = "0.3.1"
EXPECTED_VERSION = "0.3.2"


##########################################################################
Expand Down
44 changes: 22 additions & 22 deletions yellowbrick/classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,32 +412,32 @@ def roc_auc(model, X, y=None, ax=None, **kwargs):
class ClassBalance(ClassificationScoreVisualizer):
"""
Class balance chart that shows the support for each class in the
fitted classification model displayed as a bar plot.
"""
def __init__(self, model, ax=None, classes=None, **kwargs):
"""
Pass in a fitted model to generate a class balance chart.
fitted classification model displayed as a bar plot. It is initialized
with a fitted model and generates a class balance chart on draw.
Parameters
----------
Parameters
----------
:param ax: the axis to plot the figure on.
ax: axes
the axis to plot the figure on.
:param model: the Scikit-Learn estimator
Should be an instance of a classifier, else the __init__ will
return an error.
model: estimator
Scikit-Learn estimator object. Should be an instance of a classifier,
else ``__init__()`` will raise an exception.
:param classes: a list of class names for the legend
If classes is None and a y value is passed to fit then the classes
are selected from the target vector.
classes: list
A list of class names for the legend. If classes is None and a y value
is passed to fit then the classes are selected from the target vector.
:param kwargs: keyword arguments passed to the super class. Here, used
to colorize the bars in the histogram.
kwargs: dict
Keyword arguments passed to the super class. Here, used
to colorize the bars in the histogram.
These parameters can be influenced later on in the visualization
process, but can and should be set as early as possible.
These parameters can be influenced later on in the visualization
process, but can and should be set as early as possible.
"""
def __init__(self, model, ax=None, classes=None, **kwargs):

"""
super(ClassBalance, self).__init__(model, ax=ax, **kwargs)

self.colors = color_palette(kwargs.pop('colors', None))
Expand All @@ -457,7 +457,7 @@ def fit(self, X, y=None, **kwargs):
kwargs: keyword arguments passed to Scikit-Learn API.
Returns
------
-------
self : instance
Returns the instance of the classification score visualizer
Expand All @@ -481,7 +481,7 @@ def score(self, X, y=None, **kwargs):
An array or series of target or class values
Returns
------
-------
ax : the axis with the plotted figure
"""
Expand All @@ -495,7 +495,7 @@ def draw(self):
Renders the class balance chart across the axis.
Returns
------
-------
ax : the axis with the plotted figure
Expand Down
22 changes: 14 additions & 8 deletions yellowbrick/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ def is_classifier(estimator):
estimator: class or instance
The object to test whether or not is a Scikit-Learn classifier.
See Also:
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/base.py#L526
See also
--------
is_classifier
`sklearn.is_classifier() <https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/base.py#L518>`_
"""
# TODO: once we make ScoreVisualizer and ModelVisualizer pass through
# wrappers as in Issue #90, these three lines become unnecessary.
Expand All @@ -113,8 +115,10 @@ def is_regressor(estimator):
model: class or instance
The object to test whether or not is a Scikit-Learn regressor.
See Also:
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/base.py#L531
See also
--------
is_regressor
`sklearn.is_regressor() <https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/base.py#L531>`_
"""
# TODO: once we make ScoreVisualizer and ModelVisualizer pass through
# wrappers as in Issue #90, these three lines become unnecessary.
Expand Down Expand Up @@ -161,13 +165,15 @@ def memoized(fget):
getter on the first access. The result is stored and on subsequent
accesses is returned, preventing the need to call the getter any more.
See Also:
https://github.com/estebistec/python-memoized-property
Parameters
----------
fget: function
The getter method to memoize for subsequent access.
See also
--------
python-memoized-property
`python-memoized-property <https://github.com/estebistec/python-memoized-property>`_
"""
attr_name = '_{0}'.format(fget.__name__)

Expand All @@ -189,7 +195,7 @@ class docutil(object):
single call wrapper should be identical, this decorator ensures that we
only have to edit one doc string.
Usage:
Usage::
@docutil(Visualizer.__init__)
def visualize(*args, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions yellowbrick/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
__version_info__ = {
'major': 0,
'minor': 3,
'micro': 1,
'micro': 2,
'releaselevel': 'alpha',
'serial': 2,
'serial': 3,
}

##########################################################################
Expand Down

0 comments on commit 1ad9776

Please sign in to comment.