* remove needless argument checking
* add parameter checking as in LeavePGroupsOut
* add examples with dummy inputs
* add unittest for a get_n_splits method in LeaveOneGroupOut and LeavePGroupsOut classes
* X and y can be ommited in a get_n_splits function.
* fix error messages
* update examples
* fix test for an error message
* Revert "fix test for an error message"
This reverts commit 68b984207c.
* fix test for an error message
* fix error messages
* remove tailing white spaces
* add periods to messages
* test for ValueError’s of get_n_splits methods of LeaveOneOut / LeavePOut classes
* fix documents:
* parameter name: group -> groups
* modfy white space
* Add _RepeatedSplits and RepeatedKFold class
* Add RepeatedStratifiedKFold and doc for repeated cvs
* Change default value of n_repeats
* Change input parameters of repeated cv constructor to n_splits, n_repeats, random_state
* Generate random states in split function rather than store it beforehand
* Doc changes, inheriting RepeatedKFold, RepeatedStratifiedKFold from _RepeatedSplits and other review changes
* Remove blank line, put testcases for deterministic split in loop and add StopIteration check in testcase
* Using rng directly as random_state param to create cv instance and added a check for cvargs
* Fix pep8 warnings
* Changing default values for n_splits and n_repeats and add entry in changelog
* Adding name to the feature
* Missing space
* ENH Accept keyword parameters to hyperparameter search fit methods
Deprecate ``fit_params`` as a constructor argument to the hyperparameter search classes and instead accept keyword parameters to the ``fit`` methods. This makes the ``fit`` methods of these functions conform to the Estimator API and allows the use of hyperparameter search functions in other CV utility functions such as ``cross_val_predict``.
* CR: Expanded tests, remove deprecated use in Ridge
* Make tests consistent in Python 2 and 3
* Add supervised cluster metrics to metrics.scorers
* Add all the supervised cluster metrics to the tests
* Add test for fowlkes_mallows_score in unsupervised grid search
* COSMIT: Clarify comment on CLUSTER_SCORERS
* Fix doctest
Squashed commits:
[94fd9f4] split data using _safe_split in _permutaion_test_scorer
[522053b] adding test case test_permutation_test_score_pandas() to check if permutation_test_score plays nice with pandas dataframe/series
[21b23ce] running test_permutation_test_score_pandas on iris data to prevent warnings.
[15a48bf] adding safe_indexing to _shuffle function
[9ea5c9e] adding test case test_permutation_test_score_pandas() to check if permutation_test_score plays nice with pandas dataframe/series
[3cf5e8f] split data using _safe_split in _permutaion_test_scorer to fix error when using Pandas DataFrame/Series
* Remove Python 2.6 support
Some details about some slightly orthogonal changes:
* Note about cheking safely for nan is likely not valid any more (commit
introducing it is c80ca91b)
* scipy.linalg.qr econ parameter removed since scipy 0.9 in favour of
mode='economic'
* Remove unnecessary libgfortran in conda create command
* Putative fix by setting the random seed
* Revert unintended change
* Reinstate previous logic for checking for NaNs
* Reinstate change in error message
Error messages from Python 2.7 assertRegexp does not contain the
function name, in contrast with Python 3 assertRegex
* FIX raise an error message when n_groups > actual number of groups (#7681)
This change addresses issue #7681:
- Raise ValueError when n_groups > actual number of unique groups in LeaveOneGroupOut and LeavePGroupsOut.
- Add unit test.
* Make requested changes
- Check error message with `assert_raise_message`
- Pass parameters to `assert_raise_message` instead of defining functions
* Update condition and exception message
* Chooses randomly the indices for different training sizes
* Bring back deleted line
* Rewrote the description of 'shuffle' attribute
* use random.sample instead of np.random.choice
* replace tabs with spaces
* merge to master
* Added shuffle in model-selection's learning_curve method
* Added shuffle for incremental learning + addressed Joel's comment
* Shorten long lines
* Add 2 blank spaces between test cases
* Addressed Joel's review comments
* Added 2 blank lines between methods
* Added non regression test for learning_curve with shuffle
* Fixed indentions
* Fixed space issues
* Modified test cases + small code improvements
* Fix some style issues
* Addressed Joel's comments - removed _shuffle_train_indices, more test cases and added new entry under 0.19/enhancements
* Added some modifications in whats_new.rst
* FIX Subclass a new MaskedArray which allows pickling even when dype=object
* TST unpickling too
* FIX Use MaskedArray from utils.fixes rather than from numpy
* FIX imports
* Don't assign a variable
* FIX np --> numpy
* Use tostring instead of tobytes for old numpy
* COSMIT pickle-able --> picklable
* use #noqa comment to turn off flake8
* TST/ENH Check if the pickled est's predict matches with the original one's
* Resolved issue #6894 and #6895:
Now *SearchCV.results_ includes both timing and training scores.
wrote new test (sklearn/model_selection/test_search.py)
and new doctest (sklearn/model_selection/_search.py)
added a few more lines in the docstring of GridSearchCV and RandomizedSearchCV.
Revised code according to suggestions.
Add a few more lines to test_grid_search_results():
1. check test_rank_score always >= 1
2. check all regular scores (test/train_mean/std_score) and timing >= 0
3. check all regular scores <= 1
Note that timing can be greater than 1 in general, and std of regular scores
always <= 1 because the scores are bounded between 0 and 1.
* ENH/FIX timing and training score.
* ENH separate fit / score times
* Make score_time=0 if errored; Ignore warnings in test
* Cleanup docstrings
* ENH Use helper to store the results
* Move fit time computation to else of try...except...else
* DOC readable sample scores
* COSMIT Add a commnent on why time test is >= 0 instead of > 0
(Windows time.time precision is not accurate enought to be non-zero
for trivial fits)
* Convey that times are in seconds
* Support of the collections.Sequence type has been added to the _check_param_grid method from model_selection.
* test_grid_search_when_param_grid_includes_range test was refactored (parts that are not nessesary have been removed).
* test_grid_search_bad_param_grid now checks that value is not string. This is important since string is a Sequence.
* _check_param_grid now checks is the type is not string together with the check for other types.
* whats_new.rst has been updated to include information about bug fix for bug #7322.
* Description of the fix for the bug #7322 has been updated.
* Fix for indented in model_selection._search.py.