Commit Graph

28 Commits

Author SHA1 Message Date
Thomas J. Fan 3d326aad0a
MAINT Remove deprecated exceptions for 1.1 (#22659) 2022-03-03 10:31:50 +01:00
Thomas J. Fan 3ae7c76153
STY Enables black with experimental_string_processing=true (#20412) 2021-06-29 09:47:04 +02:00
Thomas J. Fan 82df48934e
MNT Applies black formatting to most of the code base (#18948) 2021-06-17 14:21:09 -04:00
Guillaume Lemaitre 2218ec4622
MNT change 0.25 to 1.0 and 0.26 to 1.1 in deprecation messages (#19005)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2020-12-18 16:09:19 +00:00
Adrin Jalali 3a49e5f209
MNT deprecate ChangedBehaviorWarning and NonBLASDotWarning (#17804)
* deprecate ChangedBehaviorWarning and NonBLASDotWarning

* add whats_new entry
2020-07-05 22:32:08 +02:00
Thomas J Fan 839b356f45
DOC Removes examples from exceptions docstrings (#17040) 2020-04-27 23:45:03 +10:00
Thomas J Fan 2592edddb6
MNT Fixes DataConversionWarning doctest in pypy (#16965) 2020-04-23 12:12:07 -04:00
Daniël van Gelder 5dfca463ac
DOC DataConversionWarning: Add example to doc of DataCon… (#16704) 2020-04-20 00:21:19 +10:00
Thomas J Fan 1e166f77f8 [MRG] MNT Updates pypy to use 7.2.0 (#15954) 2019-12-30 00:18:40 +01:00
Gregory Morse a05a5bc2b3 ENH Yield stack trace information in resilient mode model_selection warnings (#15622) 2019-12-14 15:32:59 -05:00
Hanmin Qin dc111489a1
DOC correct some indents (#15875) 2019-12-13 11:51:17 +08:00
smarie 343214085a ENH KernelPCA raises error in case of numerical/conditioning issues (#12145) 2019-11-14 12:29:23 -05:00
Nicolas Hug 0f157e9475 ENH Minor update to error message from check_is_fitted (#15357) 2019-10-27 13:06:34 +01:00
flaviomorelli f7e2b74b00 DOC Added example to ConvergenceWarning (#15216) 2019-10-14 18:23:29 +02:00
Thomas J Fan be17713d85
MAINT Upgrade CI to PyPy 7.1.1, fix CI failure on master (#13912) 2019-06-24 13:39:10 -04:00
Thomas J Fan 2e7e06b78f [MRG] Doctest with print change only adjusts default options for doctest (#13991) 2019-06-01 10:53:45 +02:00
Agamemnon Krasoulis 19192c0427 MAINT Replace manual checks with `check_is_fitted` (#13013) 2019-05-07 14:54:56 +10:00
Stephen Cowley e7ca6236c5 Fix spacing and formatting inconsistencies (#13747) 2019-05-02 01:29:49 +10:00
Wenhao Zhang 22b9267095 Compatibility with python 3.7.0b5 #11224 (#11256) 2018-06-14 09:27:33 +02:00
Mayur Kulkarni 92c9095591 [MRG+1] FIX Improve message and exception of cross-validation FitFailedWarning (#10382) 2018-01-10 16:20:05 -08:00
Andreas Mueller 4321002934 API deprecate *SearchCV iid parameter (#9379) 2017-12-12 09:30:27 +11:00
Kathy Chen 04b67e2bcd [MRG+1] Fix estimators to work if sample_weight parameter is pandas Series type (#7825)
* addressed comments in the PR about parameters in check_array

* update the test case for the evaluation of estimators with pandas series

* bug fix, need to check for *not* None explicitly

* updated with isinstance check if the documentation says there is acceptance of floats

* ran pep8 linter on modified files

* moving the test case to estimators_check

* add a predict function into the testing pandas.Series class

* avoid running anything beyond the newly added meta checks

* check if pandas is installed before running the specific test

* changed the order of the try-catch to check for sample_weight param beforehand

* pass on import error rather than printing something to std out

* improve test case naming and pd.Series check in the bad estimator class

* address a pep8 linter error with unused import

* pep8 warning disabled for potential unused import

* throw a warning when SkipTest is raised

* add a SkipTestWarning

* updated the whats_new.rst with this issue

* rebase and fix a spacing issue
2016-12-03 15:56:22 -05:00
Andreas Mueller 60a1356f31 [MRG + 1] More versionadded everywhere! (#7403)
* insert versionadded versionchanged directives in docstrings for 0.18

indicate where exception classes were moved from

* moved versionadded in the proper places
2016-09-27 16:19:47 -04:00
YenChenLin 46fc1be145 Remove redundant words in sklearn 2016-02-23 16:54:03 +08:00
seales 0485ada58b General spelling fixes 2015-12-16 09:46:42 -08:00
Raghav R V 3f8743f47b Main Commits - Major
--------------------

* ENH Reogranize classes/fn from grid_search into search.py
* ENH Reogranize classes/fn from cross_validation into split.py
* ENH Reogranize cls/fn from cross_validation/learning_curve into validate.py

* MAINT Merge _check_cv into check_cv inside the model_selection module
* MAINT Update all the imports to point to the model_selection module
* FIX use iter_cv to iterate throught the new style/old style cv objs
* TST Add tests for the new model_selection members
* ENH Wrap the old-style cv obj/iterables instead of using iter_cv

* ENH Use scipy's binomial coefficient function comb for calucation of nCk
* ENH Few enhancements to the split module
* ENH Improve check_cv input validation and docstring
* MAINT _get_test_folds(X, y, labels) --> _get_test_folds(labels)
* TST if 1d arrays for X introduce any errors
* ENH use 1d X arrays for all tests;
* ENH X_10 --> X (global var)

Minor
-----

* ENH _PartitionIterator --> _BaseCrossValidator;
* ENH CVIterator --> CVIterableWrapper
* TST Import the old SKF locally
* FIX/TST Clean up the split module's tests.
* DOC Improve documentation of the cv parameter
* COSMIT consistently hyphenate cross-validation/cross-validator
* TST Calculate n_samples from X
* COSMIT Use separate lines for each import.
* COSMIT cross_validation_generator --> cross_validator

Commits merged manually
-----------------------

* FIX Document the random_state attribute in RandomSearchCV
* MAINT Use check_cv instead of _check_cv
* ENH refactor OVO decision function, use it in SVC for sklearn-like
  decision_function shape
* FIX avoid memory cost when sampling from large parameter grids

ENH Major to Minor incremental enhancements to the model_selection

Squashed commit messages - (For reference)

Major
-----

* ENH p --> n_labels
* FIX *ShuffleSplit: all float/invalid type errors at init and int error at split
* FIX make PredefinedSplit accept test_folds in constructor; Cleanup docstrings
* ENH+TST KFold: make rng to be generated at every split call for reproducibility
* FIX/MAINT KFold: make shuffle a public attr
* FIX Make CVIterableWrapper private.
* FIX reuse len_cv instead of recalculating it
* FIX Prevent adding *SearchCV estimators from the old grid_search module
* re-FIX In all_estimators: the sorting to use only the 1st item (name)
    To avoid collision between the old and the new GridSearch classes.
* FIX test_validate.py: Use 2D X (1D X is being detected as a single sample)
* MAINT validate.py --> validation.py
* MAINT make the submodules private
* MAINT Support old cv/gs/lc until 0.19
* FIX/MAINT n_splits --> get_n_splits
* FIX/TST test_logistic.py/test_ovr_multinomial_iris:
    pass predefined folds as an iterable
* MAINT expose BaseCrossValidator
* Update the model_selection module with changes from master
  - From #5161
  -  - MAINT remove redundant p variable
  -  - Add check for sparse prediction in cross_val_predict
  - From #5201 - DOC improve random_state param doc
  - From #5190 - LabelKFold and test
  - From #4583 - LabelShuffleSplit and tests
  - From #5300 - shuffle the `labels` not the `indxs` in LabelKFold + tests
  - From #5378 - Make the GridSearchCV docs more accurate.
  - From #5458 - Remove shuffle from LabelKFold
  - From #5466(#4270) - Gaussian Process by Jan Metzen
  - From #4826 - Move custom error / warnings into sklearn.exception

Minor
-----

* ENH Make the KFold shuffling test stronger
* FIX/DOC Use the higher level model_selection module as ref
* DOC in check_cv "y : array-like, optional"
* DOC a supervised learning problem --> supervised learning problems
* DOC cross-validators --> cross-validation strategies
* DOC Correct Olivier Grisel's name ;)
* MINOR/FIX cv_indices --> kfold
* FIX/DOC Align the 'See also' section of the new KFold, LeaveOneOut
* TST/FIX imports on separate lines
* FIX use __class__ instead of classmethod
* TST/FIX import directly from model_selection
* COSMIT Relocate the random_state documentation
* COSMIT remove pass
* MAINT Remove deprecation warnings from old tests
* FIX correct import at test_split
* FIX/MAINT Move P_sparse, X, y defns to top; rm unused W_sparse, X_sparse
* FIX random state to avoid doctest failure
* TST n_splits and split wrapping of _CVIterableWrapper
* FIX/MAINT Use multilabel indicator matrix directly
* TST/DOC clarify why we conflate classes 0 and 1
* DOC add comment that this was taken from BaseEstimator
* FIX use of labels is not needed in stratified k fold
* Fix cross_validation reference
* Fix the labels param doc

FIX/DOC/MAINT Addressing the review comments by Arnaud and Andy

COSMIT Sort the members alphabetically
COSMIT len_cv --> n_splits
COSMIT Merge 2 if; FIX Use kwargs
DOC Add my name to the authors :D
DOC make labels parameter consistent
FIX Remove hack for boolean indices; + COSMIT idx --> indices; DOC Add Returns
COSMIT preds --> predictions
DOC Add Returns and neatly arrange X, y, labels
FIX idx(s)/ind(s)--> indice(s)
COSMIT Merge if and else to elif
COSMIT n --> n_samples
COSMIT Use bincount only once
COSMIT cls --> class_i / class_i (ith class indices) -->
perm_indices_class_i

FIX/ENH/TST Addressing the final reviews

COSMIT c --> count
FIX/TST make check_cv raise ValueError for string cv value
TST nested cv (gs inside cross_val_score) works for diff cvs
FIX/ENH Raise ValueError when labels is None for label based cvs;
TST if labels is being passed correctly to the cv and that the
ValueError is being propagated to the cross_val_score/predict and grid
search
FIX pass labels to cross_val_score
FIX use make_classification
DOC Add Returns; COSMIT Remove scaffolding
TST add a test to check the _build_repr helper
REVERT the old GS/RS should also be tested by the common tests.
ENH Add a tuple of all/label based CVS
FIX raise VE even at get_n_splits if labels is None
FIX Fabian's comments
PEP8
2015-10-23 17:28:08 +02:00
Raghav R V e4332edeab DOC Add description for UndefinedMetricWarning 2015-10-20 11:23:04 +02:00
Raghav R V e3afc0e8c9 MAINT move custom error/warning classes into sklearn.exceptions
ENH NonBLASDotWarning -> EfficiencyWarning; Improve error message
DOC Add exceptions module to modules/classes.rst
MAINT Move ConvergenceWarning, UndefinedMetricWarning et al into exceptions
MAINT Remove ChangedBehaviorWarning from base
DOC/FIX Improve DataConversionWarning's docstring
2015-10-19 22:35:35 +02:00