Commit Graph

59 Commits

Author SHA1 Message Date
Thomas J. Fan 7cc0177f8e
MNT Replaces numpy alias with builtin typse (#17687)
* MNT Replaces numpy alias with builtin typse

* STY Lint error
2020-06-24 16:51:51 +02:00
Juan Carlos Alfaro Jiménez f42cf8a2bc
MNT Replace kwargs by named args for resample (#17324) 2020-05-26 07:48:50 +10:00
Roman Yurchak 192109af3d
MNT properly activate the env in the linting CI (#17177) 2020-05-10 13:22:55 -04:00
Thomas J Fan f703b85814
ENH Improves efficiency of ColumnTransformer for string keys (#16431) 2020-02-21 21:49:11 +01:00
Alexandre Batisse 418e0d55d3
[MRG] CLN Remove the use of assert_raises in utils/ (#16337)
* CLN use pytest raises ctxt manager for class weights & estimators [skip ci]

* CLN use pytest raises ctxt manager for multiclass test

* CLN use pytest warns in estimator checks test

* CLN use pytest raises ctxt manager for random test

* CLN use pytest raises ctxt manager for sparsefuncs test

* CLN use pytest raises ctxt manager for testing utils tests

* CLN use pytest raises ctxt manager for utils tests

* CLN use pytest raises ctxt manager for validation tests

* revert test_estimator_check.py to upstream master
2020-02-02 14:44:19 +01:00
bernie gray c45721d538 ENH check for invalid batch_size in gen_batches (#16181) 2020-01-27 09:24:50 +01:00
alexshacked c4ea377198 FIX ensure object array are properly casted when dtype=object (#16076) 2020-01-14 18:06:50 -08:00
Nicolas Hug ad80d3159a DEP Remove deprecated joblib tools in utils (#15792) 2019-12-06 13:59:46 +01:00
Guillaume Lemaitre c311efd501 FIX accept pandas Index for feature_names in PDP (#15639) 2019-11-18 06:39:43 -06:00
Guillaume Lemaitre 7ea7861482 ENH Add support for dataframe in PDP (#14028) 2019-10-31 12:24:39 -04:00
Nicolas Hug 19ad136223 MNT Replace DeprecationWarning with FutureWarning (#15080)
* bruteforce renaming

* WIP

* WIP

* some more

* removed weird line

* update -Werror

* testiforest

* again

* Fixed some tests

* fixed some tests

* removed -Werror

* fixed test_docstring_param issue

* fixed some tests

* some more

* renamed to SklearnDeprecationWarning

* pep8

* updated docs

* pep8

* merge

* changed to FutureWarning

* fixes

* Update doc/developers/tips.rst

Co-Authored-By: Adrin Jalali <adrin.jalali@gmail.com>

* avoid duplicates

* fixed warning for deprecations

* Still make CI break if DeprecationWarning isn't caught

* updated one warning

* fixed test

* fixed some renamings

* updated new dep warnings

* fixed bad import

* ignore warnings

* update again

* ignore futurewarning when walking packages

* Fixed test

* pep8

* Added whatsnew
2019-10-29 15:39:26 +01:00
Nicolas Hug b92455a6b2 MAINT Deprecate all of utils.testing except all_estimators (#15367) 2019-10-28 17:28:56 +01:00
Nicolas Hug 96c988cdde
MNT Make safe_indexing private (#15104) 2019-10-02 11:47:46 -04:00
Thomas J Fan dba753a200 API Auto generates deprecation for sklearn.utils.mocking (#15071) 2019-10-03 00:09:28 +10:00
Guillaume Lemaitre ae5f55888b [MRG] ENH add support for scalar, slice and mask in safe_indexing axis=0 (#14475) 2019-09-04 19:45:19 +10:00
Guillaume Lemaitre 992ed41ecc FIX change boolean array-likes indexing in old NumPy ver… (#14510) 2019-08-02 10:46:16 -04:00
Guillaume Lemaitre 5f37ec1a99 ENH add parameter axis in safe_indexing to slice rows and columns (#14035) 2019-07-03 07:59:35 +10:00
Nicolas Hug f3eb9d2206 [MRG] MNT removing assert_equal, etc -- continued (#14232) 2019-07-02 14:53:51 +10:00
Adrin Jalali 19c068a2ec MNT towards removing assert_equal, etc (#14222) 2019-07-01 09:13:32 -04:00
Nicolas Hug 14bdb9d7a8 FEA Add a stratify option to utils.resample (#13549) 2019-04-24 23:16:38 +02:00
Thomas J Fan 8edd9f9f15 ENH Add verbose option to Pipeline, FeatureUnion, and ColumnTransformer (#11364) 2019-04-22 00:51:21 +10:00
Roman Yurchak 0e3bb17e62 MAINT Run pyupgrade following Python2 deprecation (#12997) 2019-02-08 20:13:34 +08:00
Thomas Moreau d25da1be20 FIX make joblib utils private, and remove mentions of externals.joblib (#12345) 2018-11-20 10:53:52 +11:00
Hanmin Qin 43e3a02085
MNT Remove unused assert_true imports (#12560) 2018-11-11 11:08:37 +08:00
Yaroslav Halchenko 362cb3bcab TST autoreplace assert_true(...==...) with plain assert (#12547) 2018-11-11 09:05:34 +08:00
Andreas Mueller 0f94f2962b
MNT simple deprecations and removals for 0.21 (#12238)
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.
2018-10-11 14:56:37 -04:00
TakingItCasual 74b56dbc57 MNT Converting http to https (#12277) 2018-10-04 22:37:57 +08:00
jeremiedbb 0d8a04bd17 [MRG+1] SimpleImputer(strategy="constant") (#11211) 2018-06-20 17:20:33 +02:00
Joel Nothman ef8d22af7c
ENH Add working_memory global config for chunked operations (#10280) 2018-05-25 12:04:05 +10:00
Loïc Estève 682e85fb1a Fix safe_indexing with read-only indices (#9507) 2017-08-08 10:21:09 +02:00
Vlad Niculae 738053e657 [MRG+2] MAINT: no longer backport graph_laplacian, use scipy one (#9077) 2017-06-09 16:23:55 +02:00
Naoya Kanai bd0fc236e0 [MRG+1] MAINT drop SciPy < 0.13 (#8854)
Remove sklearn.utils.fixes functions that are not needed for scipy >= 0.13 and keep deprecated wrappers in other modules.
2017-06-02 23:36:33 +02:00
James Fiedler e4b837cc66 Removed unused imports 2016-07-29 19:30:23 -05:00
ningchi 6ce198c78f [MRG] #6581 n_samples of utils.resample can be more when replace is True
* #6581 n_samples can be more when replace is True

* more compact code
2016-04-02 08:58:40 +02:00
Peter Fischer 8ff339eb5b Update test_utils.py
Comment instead of docstring to follow sklearn convention.
Regression test made easier by adding small value to main diagonal of s.p.d. matrix
2015-10-23 08:57:31 +02:00
Peter Fischer 6cb51b2a28 Initialize ARPACK eigsh
`v0 = random_state.rand(M.shape[0])` leads to an initial residual vector in ARPACK which is all positive. However, this is not the absolute or squared residual, but a true difference. Thus, it is better to initialize with `v0=random_state.uniform(-1, 1, M.shape[0])` to have an equally distributed sign. This is the way that ARPACK initializes the residuals.
The effect of the previous initialization is that eigsh frequently does not converge to the correct eigenvalues, e.g. negative eigenvalues for s.p.d. matrix, which leads to an incorrect null-space.

- initialized all occurences of sklearn.utils.arpack.eigsh the same way it would be initialzed by ARPACK
- regression test to test behavior of new initialization
2015-10-23 08:57:30 +02:00
Andreas Mueller 990a6b402f FIX n_jobs slicing bug in dict learning, add input validation to gen_even_slices 2015-05-20 15:29:25 -04:00
Andreas Mueller f11f5c849e TST don't check that warning was raised as whether a copy needs to be made or not depends on the pandas version. Version 0.12 and 0.13 apparently don't use cython here, and >0.17 will have a fix. 2015-05-13 09:52:54 -04:00
Andreas Mueller cdfaabfa0b FIX work-around for read only dataframes 2015-05-05 19:26:35 -04:00
Olivier Grisel e12863f103 FIX make shuffle / resample pass-through indexing utilities 2015-04-10 16:11:22 -04:00
Raghav R V cd2ee7e454 MAINT docstring --> comments to prevent nose from using doc in verbose mode 2015-03-21 11:16:49 +05:30
Lars Buitinck 2666b702d2 TST stronger test_shuffle_on_ndim_equals_three 2014-09-25 19:37:35 +02:00
Will Lamond 766fb56ec0 FIX allow ndim>2 in shuffle
Fixes #3694.
2014-09-25 19:29:44 +02:00
Andreas Mueller b080d93b5e ENH don't convert dataframes in grid search and cross-validation 2014-07-18 10:02:14 +02:00
Andreas Mueller 5fe7c2ca2f add test for safe_indexing, add another test for cross_val_score 2014-07-16 11:31:41 +02:00
Andreas Mueller d8f90d137d use column_or_1d, move it to utils 2013-07-26 17:16:27 +02:00
Vlad Niculae f4a4016d14 Cloned @jakevdp's pinvh tests 2012-09-04 19:58:47 +01:00
Jake Vanderplas 776b060098 @jakevdp's version of pinvh
speed up symmetric_pinv
2012-09-04 19:58:46 +01:00
Vlad Niculae 4a5a1d6d84 Compute pseudoinverse using eigendecomposition 2012-09-04 19:58:46 +01:00
Alexandre Gramfort ad8e4912cb TST: use assert_true instead of assert + remove some relative imports 2012-02-11 15:43:03 +01:00