Skip to content

Commit

Permalink
version documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
flennerhag committed Oct 31, 2017
1 parent 256dd37 commit 64e45dc
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions mlens/model_selection/model_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
:copyright: 2017
:license: MIT
Class for parallel tuning a set of estimators that share a common
preprocessing pipeline.
Model selection suite for tuning and benchmarking a set of estimators.
"""
# pylint: disable=too-many-instance-attributes
# pylint: disable=too-many-arguments
Expand Down Expand Up @@ -81,6 +80,8 @@ def benchmark(X, y, scorer, cv, estimators,
If ``verbose>=20``, prints to ``sys.stderr``, else ``sys.stdout``.
.. versionadded:: 0.2.0
Returns
-------
results : dict
Expand All @@ -96,9 +97,9 @@ class BaseEval(IndexMixin, BaseBackend):

"""Base Evaluation class."""

def __init__(self, **kwargs):
self.verbose = kwargs.pop('verbose', False)
self.array_check = kwargs.pop('array_check', False)
def __init__(self, verbose=False, array_check=2, **kwargs):
self.verbose = verbose
self.array_check = array_check
self._transformers = None
self._learners = None
super(BaseEval, self).__init__(**kwargs)
Expand Down Expand Up @@ -192,11 +193,21 @@ class Benchmark(BaseEval):

"""Benchmark engine
Simple benchmark engine for running no iteration jobs
Benchmark engine without hyper-parameter grid search.
.. versionadded:: 0.2.0
Parameters
----------
verbose: bool, int, optional
Verbosity during estimation.
**kwargs: optional
Optional keyword argument to :class:`BaseBackend`.
"""

def __init__(self, **kwargs):
super(Benchmark, self).__init__(**kwargs)
def __init__(self, verbose=False, **kwargs):
super(Benchmark, self).__init__(verbose=verbose, **kwargs)
self.results = None
self.indexer = None

Expand Down Expand Up @@ -299,6 +310,8 @@ class Evaluator(BaseEval):
relies on a randomized grid search, so parameter grids must be specified as
SciPy distributions (or a class that accepts a ``rvs`` method).
.. versionchanged:: 0.2.0
Parameters
----------
scorer : function
Expand Down

0 comments on commit 64e45dc

Please sign in to comment.