Commit Graph

613 Commits

Author SHA1 Message Date
Juan Martin Loyola b0cac5339a
TST Replace assert_warns with pytest context manager in sklearn/utilst/tests/test_testing.py (#20436) 2021-07-06 10:58:29 +02:00
Juan Martin Loyola 0d343bb2d2
Replace assert_warns* with pytest context manager in sklearn/utilst/tests/* (#20421) 2021-06-30 23:57:16 +02: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 1abc3f21c8
FIX deprecated properties correctly wraps the property's docstring (#20385) 2021-06-26 21:40:18 +02:00
Thomas J. Fan 351ace7935
STY Uses black's with target_version >= 3.7 (#20294) 2021-06-17 15:50:27 -04: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
Alihan Zihna 3c72fe5051
TST Changes assert_raises to raises in sklearn/utils/test_estimator_checks.py (#20138)
Co-authored-by: Alihan Zihna <a.zihna@ckhgbdp.onmicrosoft.com>
2021-05-27 08:44:12 +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
Jérémie du Boisberranger 6d67937b3c
cln deprecations fixes (#19323)
Co-authored-by: Olivier Grisel <olivier.grisel@gmail.com>
2021-05-11 11:08:13 +02:00
Sylvain Marié bf0886bae0
[MRG after #12145] Add "Randomized SVD" solver option to KernelPCA for faster partial decompositions, like in PCA (#12069)
Co-authored-by: Sylvain MARIE <sylvain.marie@se.com>
Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
Co-authored-by: Joel Nothman <joel.nothman@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@gmail.com>
Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org>
2021-04-27 16:06:10 +02:00
Andrew Delong a67b284f90
FIX Encoder should accept categories having dtype='S' (#19727)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-04-21 17:34:28 -04:00
Jérémie du Boisberranger 57d3668f2a
MNT Avoid catastrophic cancellation in mean_variance_axis (#19766) 2021-03-31 09:20:22 +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
Avi Gupta cc1b171af8
Replaced assert_raises from utils/tests/test_estimator_checks (#19709) 2021-03-19 17:33:57 +01: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
cliffordEmmanuel 77e998db35
ENH Deprecated the default random_state=0 in randomized_svd (#19670)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: cinbez <cindyb@lightstone.co.za>
2021-03-15 12:22:16 +01:00
Norbert Preining 8066086a85
MNT Consolidate _incremental_weighted_mean_and_var into _incremental_mean_and_var (#19422) 2021-02-10 16:37:14 +01:00
Mabu Manaileng c3f647a6b2
MNT Fix divide by zero error thrown by _random_choice_csc during a test run (#19383) 2021-02-09 14:37:26 +01:00
Jérémie du Boisberranger 673f6259f3
Fix min_pos when all negative + speed up (#19328) 2021-02-03 22:52:18 +01:00
Thomas J. Fan 38e6022e24
TST Ignores PendingDeprecationWarning in tests (#19301) 2021-01-30 13:35:07 +01:00
Christian Lorentzen 27f1c737f2
FEA Add SplineTransformer (#18368) 2021-01-24 10:53:27 +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
Guillaume Lemaitre 255718b4ad
introduce _safe_tags for estimator not inheriting from BaseEstimator (#18797)
Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2020-12-02 11:18:53 +01:00
Gaurav Desai da562b4fa5
MNT initialize weights when using ARPACK solver with a utility (#18302)
Co-authored-by: Ivan PANICO <ivpanico@gmail.com>
Co-authored-by: Ivan Panico <iv.panico@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2020-11-27 18:25:35 +01: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
Juan Carlos Alfaro Jiménez 1864ed442e
MNT Raise error if parameter cannot be retrieved (#17448)
* MNT Raise error if parameter cannot be retrieved

* MNT Prefer pytest.raises over assert_raises_regex

* FIX Fix tests

* DOC Add what's new entry
2020-10-28 19:05:15 +01:00
Maria Telenczuk f1111be2fa
incremental mean and var for weighted sparse X (#18569)
Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2020-10-23 22:16:27 +02:00
Alexandre Gramfort 20b27858b9
FIX raise proper error in incr_mean_variance_axis with axis=1 and mismatch shape input arrays (#18655) 2020-10-21 14:11:39 +02:00
Thomas J. Fan eeddc17a85
ENH Adds missing value support to OneHotEncoder (#17317)
OneHotEncoder supports categorical features with missing values by
considering the missing values as an additional category.
2020-10-09 08:38:33 +02:00
Guillaume Lemaitre 73732e5a0b
TST Add sample order invariance to estimator_checks (#18570) 2020-10-08 15:02:09 +02:00
Xethan cdff9b0b49
MNT Avoid nonlinear complexity for repr of nested estimators when print_c… (#18508)
* Avoid nonlinear complexity for repr of nested estimators when print_changed_only=True

* Automatically consider parameters with no default value as changed

* Use helper function for improved readability

* Add a non-regression test and a release note entry

Co-authored-by: nathan <nathan@sancare.fr>
2020-10-08 14:48:58 +02:00
Maria Telenczuk ca0065d3bf
BUG exchanging _safe_accumulator_op for np.average (#18537) 2020-10-06 17:14:28 +02:00
Albert Villanova del Moral 3bb138f879
ENH Incremental weighted mean and var (#18447)
Co-authored-by: Piotr Gaiński <dociebieaniuszlem@gmail.com>
2020-10-01 23:55:41 +02:00
Nicolas Hug 5721629fd3
MNT Use a pytest-like context manager in estimator_checks.py (#18418) 2020-09-28 15:05:43 -04:00
Nicolas Hug c654555ffb
MNT Revert "MNT Don't validate error messages when strict mode is off" (#18481) 2020-09-28 13:22:17 -04:00
Nicolas Hug a49032cee0
MNT Don't validate error messages when strict mode is off (#18415)
in check_estimator
2020-09-26 08:50:24 +02:00
Thomas J. Fan 06d6f8a9f6
FIX Passes global configuration when spawning joblib jobs (#17634)
* WIP

* BUG Passes context to joblib jobs

* BUG Fix

* BUG Fix

* CLN Moves delayed into fixes

* CLN Adds linter

* REV Revert diff

* DOC Adds comment for removal

* Use a simple implementation
2020-09-21 16:59:42 +02: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
Timo Kaufmann 86101d7ac8
TST Relax init parameter checks for unmutable objects (#17936) 2020-08-07 09:15:27 +02: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
Bruno Charron 9b42b0cc7d
FIX Fix handling of binary_only tag in check_estimator (#17812)
Co-authored-by: Bruno Charron <bruno@charron.email>
2020-07-06 17:13:06 -04:00
Thomas J. Fan 692899d172
TST Fix estimator checks for classifers with poor_score tag (#16851) 2020-06-27 10:56:15 +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
Hirofumi Suzuki c29092d699
MNT define a parse_version function in sklearn.utils.fixes (#17670)
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2020-06-24 13:35:49 +02:00