Skip to content

Commit

Permalink
RandomizedSearchCV Implementation (#132)
Browse files Browse the repository at this point in the history
* add RandomizedSearchCV class

* add RandomizedSearchrchCV to namespace

* add scipy version

* tests for RandomizedSearchCV

* PEP8 4ever

* refactor GridSearchCV and RandomizedSearchCV using an abstract base class

* remove version parser

* add scipy>=1.0.0 to all requirements.txt

* unit test for _parse_options helper function

* use copies of params

* remove extraneous print from test_search.py

* linting

* linting round 2 😅

* Update utils.py

* Update utils.py

* style consistency (docstrings, minor spelling fix) 🎨

* update sphinx docs to leave out base class
  • Loading branch information
whensbrunch authored and NicolasHug committed Jan 28, 2018
1 parent 9c637e3 commit 5d3aa27
Show file tree
Hide file tree
Showing 7 changed files with 559 additions and 132 deletions.
8 changes: 7 additions & 1 deletion doc/source/model_selection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,11 @@ Cross validation
Parameter search
================

.. automodule:: surprise.model_selection.search
.. autoclass:: surprise.model_selection.search.GridSearchCV
:members:
:inherited-members:

.. autoclass:: surprise.model_selection.search.RandomizedSearchCV
:members:
:inherited-members:

3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
joblib>=0.11
numpy>=1.11.2
scipy>=1.0.0
six>=1.10.0
joblib>=0.11
11 changes: 6 additions & 5 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Requirements file for development
Cython>=0.24.1
flake8>=3.2.1
joblib>=0.11
numpy>=1.11.2
cython>=0.24.1
six>=1.10.0
pandas
pytest>=3.0.3
scipy>=1.0.0
six>=1.10.0
sphinx>=1.4.9
sphinx_rtd_theme
sphinxcontrib-bibtex
sphinxcontrib-spelling
flake8>=3.2.1
pandas
joblib>=0.11
11 changes: 6 additions & 5 deletions requirements_travis.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Requirements file for travis
numpy>=1.11.2
Cython>=0.24.1
six>=1.10.0
flake8>=3.2.1
joblib>=0.11
numpy>=1.11.2
pandas
pytest>=3.0.3
scipy>=1.0.0
six>=1.10.0
sphinx>=1.4.9
sphinx_rtd_theme
sphinxcontrib-bibtex
flake8>=3.2.1
pandas
joblib>=0.11
5 changes: 3 additions & 2 deletions surprise/model_selection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

from .validation import cross_validate

from .search import GridSearchCV
from .search import GridSearchCV, RandomizedSearchCV

__all__ = ['KFold', 'ShuffleSplit', 'train_test_split', 'RepeatedKFold',
'LeaveOneOut', 'PredefinedKFold', 'cross_validate', 'GridSearchCV']
'LeaveOneOut', 'PredefinedKFold', 'cross_validate', 'GridSearchCV',
'RandomizedSearchCV']
Loading

0 comments on commit 5d3aa27

Please sign in to comment.