Commit Graph

115 Commits

Author SHA1 Message Date
alexshacked 138dd7b88f
FIX be more permissive with using subtype in test_check_pandas_sparse_valid (#18277) 2020-08-27 17:17:57 +02:00
alexshacked 0111511ea3
FIX Raise proper error for sparse dataframe with mixed dtypes (#17992)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2020-08-25 13:54:05 -04:00
Christian Kastner 5af6561441
TST Change expected result type np.int64 -> np.int (#18089)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2020-08-07 08:46:53 +02:00
Juan Carlos Alfaro Jiménez 547ead6c0c
MNT More replacements of numpy aliases with built-in types (#17707)
* MNT More replacements of numpy aliases with built-in types [scipy-dev]

* MNT More (manual) replacements of numpy aliases

* MNT More (manual) replacements of numpy aliases

* FIX Minor change

* MNT Trigger build [scipy-dev]

* FIX Minor change

* MNT Trigger build [scipy-dev]

* FIX More deprecations of numpy aliases [scipy-dev]

* MNT Silent numpy aliases warnings [scipy-dev]

* FIX Fix silent deprecations

* Trigger build [scipy-dev]

* FIX Add scape characters [scipy-dev]

* FIX Remove package specification from silent

* Trigger build [scipy-dev]

* Revert
2020-06-26 12:45:03 +02:00
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
Thomas J Fan acbe13c07d
ENH Adds pandas IntegerArray support to check_array (#16508) 2020-04-28 19:00:12 +02:00
Nicolas Hug 76ef8b0ef0
API kwonly for utils (#17046)
* kwonly for utils

* More

* fixed some

* some more

* iwannagohomepls

* accept_sparse not kwonly anymore
2020-04-27 15:42:01 +02:00
Roman Yurchak f621d8a392
Revert "API kwonly for utils (#17007)" (#17045) 2020-04-26 18:30:09 +02:00
Nicolas Hug 81c1e9d1f2
API kwonly for utils (#17007) 2020-04-26 18:05:16 +02:00
Thomas J Fan 9901d8df13
Fix _deprecate_positional_args for kwonly args w/o default (#16850) 2020-04-14 09:38:32 -04:00
Thomas J Fan fa1ea2ab6f
ENH Adds support for pandas dataframe with only sparse arrays (#16728) 2020-03-27 12:09:23 +01:00
Roman Feldbauer 9b39c4c4d2
TST Fix unreachable code in tests (#16110) 2020-02-16 14:41:26 +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
Adrin Jalali 46001e7cfb FIX support scalar values in fit_params in SearchCV (#15863)
* support a scalar fit param

* pep8

* TST add test for desired behavior

* FIX introduce _check_fit_params to validate parameters

* DOC update whats new

* TST tests both grid-search and randomize-search

* PEP8

* DOC revert unecessary change

* TST add test for _check_fit_params

* olivier comments

* TST fixes

* DOC whats new

* DOC whats new

* TST revert type of error

* add olivier suggestions

* address olivier comments

* address thomas comments

* PEP8

* comments olivier

* TST fix test by passing X

* avoid to call twice tocsr

* add case column/row sparse in check_fit_param

* provide optional indices

* TST check content when indexing params

* PEP8

* TST update tests to check identity

* stupid fix

* use a distribution in RandomizedSearchCV

* MNT add lightgbm to one of the CI build

* move to another build

* do not install dependencies lightgbm

* MNT comments on the CI setup

* address some comments

* Test fit_params compat without dependency on lightgbm

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2019-12-31 13:02:45 +01:00
Thomas J Fan 9accce5519 BUG Adds attributes back to check_is_fitted (#15947)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2019-12-27 11:46:27 +01:00
Nicolas Hug 4256542b10 MNT Removed deprecated attributes and parameters (#15803) 2019-12-09 22:17:06 +08:00
Thomas J Fan 1b1c869ef3 BUG Fixes pandas dataframe bug with boolean dtypes (#15797) 2019-12-06 13:54:12 +01:00
smarie 343214085a ENH KernelPCA raises error in case of numerical/conditioning issues (#12145) 2019-11-14 12:29:23 -05:00
Nicolas Hug 12c2b40761
MNT Remaining deprecations in sklearn/file.py (#15399) 2019-11-04 14:22:42 -05: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
Andreas Mueller b9060780c7 ENH respect dtypes in pandas dataframes if homogeneous (#15094)
Only handles the case that all dtypes are numpy dtypes
2019-10-08 14:39:03 +11:00
Thomas J Fan f45017338b ENH Add Deprecating Position Arguments Helper (#13311) 2019-10-07 14:17:50 +02:00
Thomas J Fan dba753a200 API Auto generates deprecation for sklearn.utils.mocking (#15071) 2019-10-03 00:09:28 +10:00
Nicolas Hug 70f9e9f76f MNT deprecate some more utils in estimator_checks.py (#15029)
* deprecated notanarray

* deprecated is_public_parameter

* deprecated pairwise_estimator_convert_X

* deprecated checking_parameters

* pep8

* use decorator for class
2019-09-20 11:35:08 +02:00
Roman Yurchak e6a4dc97c9 FIX raise error for float to int casting with NaN, inf in check_array (#14872) 2019-09-20 11:04:45 +02:00
Andreas Mueller 92af3dabbb MAINT simplify check_is_fitted to use any fitted attributes (#14545) 2019-08-13 22:09:07 +02:00
Thomas J Fan 21959b335c [MRG] MAINT Refactor removes assert from implmentation (#14609) 2019-08-13 07:57:10 +10:00
Andreas Mueller aa4f31332d MAINT Nicer error in num_samples if shape is not valid and there's no __len__ (#14369) 2019-07-23 19:50:40 -04:00
Roman Yurchak fb169cd2b5 MAINT Common sample_weight validation (#14307) 2019-07-19 11:23:30 -04:00
Adrin Jalali 19c068a2ec MNT towards removing assert_equal, etc (#14222) 2019-07-01 09:13:32 -04:00
Guillaume Lemaitre 28480f4cb2 DEP change the default of gamma in SVM (#13801) 2019-05-07 16:12:49 +02:00
Prathmesh Savale 4b9e12e73b Deprecate "warn_on_dtype" from check_array (#13382) 2019-04-19 14:03:52 -04:00
jeremiedbb e574990d1a [MRG] MNT Clean some deprecation stuff for 0.21 (#13443) 2019-03-21 15:55:32 +01:00
Joris Van den Bossche 20f64eb111 MNT Follow force_all_finite for object dtype in check_array (#13254) 2019-03-01 07:02:37 +01:00
William de Vazelhes d31b67f23d FEA Neighborhood Components Analysis (#10058) 2019-02-28 15:58:07 +01:00
Roman Yurchak 0e3bb17e62 MAINT Run pyupgrade following Python2 deprecation (#12997) 2019-02-08 20:13:34 +08:00
Andreas Mueller 952ef6637a MRG Drop legacy python / remove six dependencies (#12639) 2019-01-03 15:50:05 +02:00
Adrin Jalali 2bd87f6ed8 Remove python < 3.5 from CI (#12746) 2018-12-14 10:53:12 +01:00
Joris Van den Bossche 4f5dd77d19 BUG: fix check_array on pandas Series with custom dtype (eg categorical) (#12706)
Closes #12699. Related to #12625
2018-12-03 21:25:52 +11:00
Bartosz Michałowski fa98a72dcc MNT Replaced all occurrences of assert_true and assert_false with assert (#12588) 2018-11-28 09:16:26 +08:00
Andreas Mueller 104f684791 FIX check_array dtype check for pandas series (#12625) 2018-11-21 09:23:01 +11: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
Zach Miller 5d8dfc9677 FIX SkLearn `.score()` method generating error with Dask DataFrames (#12462) 2018-11-06 21:46:13 +11:00
Jacopo Notarstefano a1be3254c0 MNT Make check_X_y raise a better error when y is None (#12283) 2018-10-05 18:35:04 +08:00
Tom Dupré la Tour a11154e727 [MRG] improve check_non_negative for sparse matrices (#12106) 2018-09-27 14:13:50 +02:00
William de Vazelhes a0418215fe TST FIX use match rather than message in pytest.raises (#12001)
Previously these assertions would pass without matching.
2018-09-05 07:36:15 +10:00
Gael Varoquaux 47d3b3c30f [MRG] TST: avoid DeprecationWarning on latest joblib (#11625) 2018-07-20 16:13:50 +02:00