* Enable StratifiedKFold to produce different splits
* what's new
* redundant statement
* update what's new
* redundant comment
* add a test
* move what's new entry
* review comment
* review comment
* Fixed typo in an example
* Removed un-needed lines from example
* Added tests on the validity of parameters
* Fixed error msg for train_size issue
* Added tests to check the validation of test and train sizes
* Switched to parameterized test
* Fixed typo in error msg
* Swithced to pytest.raises
* Swithced to pytest.raises also when checking msg
* Improved the validity tests and their unit testing
Part of #11992.
These were all the things that seemed pretty straight-forward. It's actually a bit bulky but should still be easy to review, hopefully.
* add FutureWarning for methods with defaults=3
* add explicit cv values to fix assertion errors
* add tests for catching the FutureWarning
* Write current deprecation version
* Add deprecation in docstring
* change default cv value to None
* change cv from 3 to 5 in the examples
* upgrade doctests
* update doctest in tutorial
* update doctest in cross-validation doc
* fix tests
* add entry to whats new
* address Gael comments
* address Gael comments 2
* fix wrong indentation
* update doc
* add docstring deprecation warning in CV subclasses
* address Andy's comments
* fix PR number
* fix flake8
* add filterwarnings in tests
* fix doctests
* cv=None mendatory in Ridge
* fix warning related errors
* skip some doctests warnings
* make travis happy
* change from deprecated to versionchanged
* fix doctests and remove skipping
* address comments
* Use ' '.join(row) for multi-label targets in StratifiedShuffleSplit because str(row) uses an ellipsis when len(row) > 1000
* Add a new test for multilabel problems with more than a thousand labels
* DOC Add NOTE that unless random_state is set, split will not be identical
* TST use np.testing.assert_equal for nested lists/arrays
* TST Make sure cv param can be a generator
* DOC rank_ becomes a link when rendered
* Use test_...
* Remove blank line; Add if shuffle is True
* Fix tests
* Explicitly test for GeneratorType
* TST Add the else clause
* TST Add comment on usage of np.testing.assert_array_equal
* TYPO
* MNT Remove if ;
* Address Joel's comments
* merge the identical points in doc
* DOC address Andy's comments
* Move comment to before the check for generator type
* regression test and fix for 2d stratified shuffle split
* strengthen non-overlap sss tests
* clarify test and comment
* remove iter from tests, use str instead of hash
* add shuffle paramater to train_test_split
* fix syntax error
* fix variable name
* fix formatting in doctest output
* fix doctest output
* refactor shuffle paramater into ShuffleSplit and StratifiedShuffleSplit
* include shuffle option in tests
* rollback refactor
* revert to simpler version of unshuffled split
* fix flake8 errors
* revert changes to ShuffleSplit
* revert BaseShuffleSplit
* more reversions
* fix indentation
* remove shuffle parameter from CVclass
* add text to NotImplementedError
* change indexing to use numpy.arange rather than range
* specify precondition for stratify to be None in docstring
* 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
* 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