Commit Graph

127 Commits

Author SHA1 Message Date
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
Jérémie du Boisberranger 536f3ccd75
MNT Allow to only validate y in _validate_data (#20227)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-06-15 17:14:19 +02:00
Thomas J. Fan 6850c04186
API Deprecates support for np.matrix in check_array (#20165)
* API Deprecates support for np.matrix in check_array

* DOC Adds whats new

* ENH Adds link to numpy.matrix
2021-06-01 23:22:47 +02:00
Olivier Grisel 1c36b49eb2
MNT avoid pandas deprecation warning in test_validation.py (#20171) 2021-05-31 14:49:14 +02:00
Chiara Marmo 40b45e6b7c
[MRG] CI Push Scipy minimum version to 1.1.0. Remove Python 3.6 from builds. (#20069)
* Push scipy min version to 1.0.0

* Update all ubuntu images to 20.04 focal.

* Add ubuntu images 18.04 bionic and scipy fron conda-forge.

* Fix conditions.

* Pin python 3.6 for ubuntu bionic.

* Change pipeline name.

* Change matrix element name.

* Keep python 3.9 from system not conda in Ubuntu 20.04.

* Remove python directive when unnecessary.

* Cleanup.

* Downgrade to python 3.6 as scipy 1.0.0 is incompatible with 3.8.

* Fix comment.

* Fix comment.

* Pin pytest again as we are forced to use 3.6.

* Move to conda installer for 32bit linux.

* Install miniconda for ubuntu 32bit.

* Install wget for ubuntu 32bit.

* Revert 32bit OS to ubuntu bionic 18.04.

* Install scipy from pip in 32bit system.

* Fix doctest failures.

* Revert example rendering.

* Relax pytest version in ubuntu install.

* Skip failing tests.

* Put comment at the right place.

* Remove python3.6. Ubuntu32 still needs to be adapted.

* Push numpy and scipy min versions for compatibility with 3.7.

* Push matplotlib min version for compatibility with 3.7. Install numpy via pip in 32bit linux.

* Install numpy before scipy in Linux 32bit.

* Pass numpy version to linux32.

* Test 32bit architecture on debian buster (still exists for 32bit with python 3.7).

* Install matplotlib from distribution.

* Syntax error...

* Stick to the numpy debian version to avoid Expected 124 from C header, got 112 from PyObject error.

* Clean comments.

* Revert skip in doctest to check with new dependencies.

* Rename distrib.

* Skip again...

* Fix test on check_array.

* Remove comment and fix lint at the same time.

* Clean import.

* Increase atol in test_derivatives to make the test pass in py37_conda_openblas environment.

* Avoid sparse matrix dependent on scipy version.

* Skip docstring test for pandas versions less then 1.1.0.

* Fix lint error.

* Empty commit to force checks.

* Add minimal dependencies in changelog.

* Update to python 3.7 CircleCI and Travis builds.

* Move to debian buster for python3.7 dependencies.

* Fix the container tag.

* Lower the minimal pandas version for compatibility with python 3.7.
2021-05-18 16:09:36 +02:00
Thomas J. Fan 80f923e00d
ENH num_features for a 1d collection of dicts is undefined (#19740)
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
2021-03-29 16:12:54 +02:00
Thomas J. Fan d996eaf088
ENH Adds _num_features for array-likes (#19633)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
2021-03-16 15:14:25 +01:00
Thomas J. Fan 38e6022e24
TST Ignores PendingDeprecationWarning in tests (#19301) 2021-01-30 13:35:07 +01: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
Thomas J. Fan f82525ee2f
CLN Deprecations position args in PartialDependenceDisplay.plot (#18293) 2020-11-27 12:34:55 +01:00
Thomas J. Fan b197cc04e5
MNT Correctly errors in check_array with dtype=numeric and string/bytes (#18496)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2020-11-18 18:18:31 +01:00
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