Commit Graph

441 Commits

Author SHA1 Message Date
Nicolas Hug 07b0a420a9 FIX builtin PrettyPrinter usage on estimators (#12938) 2019-01-14 17:29:57 +11:00
Rüdiger Busche d300f406ae MAINT Simplify super() calls (#12812) 2019-01-10 22:27:06 +01:00
Rohan Lekhwani e0697b01a7 MNT Used scipy.special.expit for the inverse of the logit function (#12931) 2019-01-08 18:35:19 +11:00
Roman Yurchak 701144559f MAINT Remove unused utils.fixes (#12928)
This continues the work done in https://github.com/scikit-learn/scikit-learn/pull/12639 on dropping the python 2 support by,
 - ~~removing unnecessary `from __future__` imports~~
 - removing unused `sklearn.utils.fixes` assuming we can agree in https://github.com/scikit-learn/scikit-learn/issues/12927 that `sklearn.utils.fixes` are private as was stated e.g. in https://github.com/scikit-learn/scikit-learn/issues/6616#issuecomment-245109979
2019-01-08 12:43:49 +11:00
Roman Yurchak 684d8a221d MAINT Use set litterals when possible (#12667) 2019-01-06 19:21:45 +08:00
Andreas Mueller 952ef6637a MRG Drop legacy python / remove six dependencies (#12639) 2019-01-03 15:50:05 +02:00
Nicolas Hug a50c03f975 [MRG] Add pprint for estimators - continued (#11705)
* add pprint for estimators

* strip color from length, add color option

* Minor cleaning, fixes, factoring and docs

* Added some basic tests

* Fixed line length issue

* fixed flake8 and added visual test for review

* Fixed test

* Fixed Python 2 issues (inspect.signature import)

* Trying to fix flake8 again

* Added special repr for functions

* Added some other visual tests

* Changed _format_function in to _format_callable

because callable() returns True also for class objects (which we want to
reprensent with their name as well anyway)

* Consistent output in Python 2 and 3

* WIP

* Now using the builtin pprint module

* pep8

* Added changed_only param

* Fixed printing when string would fit in less than line width

* Fixed printing of steps parameter

* Fixed changed_only param for short estimators

* fixed pep8

* Added some more description in docstring

* changed_only is now an option from set_config()

* Put _pprint.py into sklearn/utils, added tests

* Added doctest NORMALIZE_WHITESPACE where needed

* Fixed tests

* fix test-doc

* fixing test that passed before....

* Fixed tests

* Added test for changed_only and long lines

* typo

* Added authors names

* Added license file

* Added ellipsis based on number of elements in sequence + added increasinly aggressive repr strategies

* Updated whatsnew

* dont use increaingly aggressive strategy

* Fixed tests

* Removed LICENSE file and put license text in _pprint.py

* fixed test_base

* Sorted parameters dictionary for consistent output in 3.5

* Actually using OrderedDict...

* Addressed comments

* Added test for NaN changed parameter

* Update whatsnew

* Added example to set_config()

* Removed example

* Added example in gallery

* Spelling
2018-12-19 23:48:21 -05: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
jeremiedbb 4e8194909c FIX remove FutureWarning in _object_dtype_isnan and add test (#12567) 2018-11-12 21:28:05 +08: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
Joel Nothman 1128094271 BLD we should ensure continued support for joblib 0.11 (#12350) 2018-11-06 22:10:23 +01:00
Zach Miller 5d8dfc9677 FIX SkLearn `.score()` method generating error with Dask DataFrames (#12462) 2018-11-06 21:46:13 +11:00
Hanmin Qin afe0a9b70d MNT skip test falling on master in legacy platforms (#12382) 2018-10-16 07:57:12 +11:00
Joel Nothman 98357ec4d4 FIX (0.21) make count_nonzero dtype invariant wrt axis (#12341) 2018-10-14 21:12:02 +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
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
TakingItCasual 74b56dbc57 MNT Converting http to https (#12277) 2018-10-04 22:37:57 +08:00
Andreas Mueller fb7be879a3 [MRG + 1] return_train_score deprecation (#12241) 2018-10-03 19:24:14 +02:00
Joel Nothman da0cb32270 FIX Use take instead of choose in compute_sample_weight (#12165) 2018-09-27 21:51:49 +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
Joel Nothman 7ed61a24fe ENH add multi_class='auto' for LogisticRegression, default from 0.22; default solver will be 'lbfgs' (#11905)
* Change default solver in LogisticRegression
* This is an API change, not a feature
* Decrease numerical precision in LogisticRegression doctest
* ENH add multi_class='auto' for LR, default from 0.22
* No warning when binary
2018-08-26 23:00:02 +03:00
Alexandre Boucaud 71525c1482 Fix filename test_{print->show}_versions.py (#11726) 2018-08-01 11:35:08 +03:00
Alexandre Boucaud b21f9b4f98 MNT Add sklearn show_versions() method (#11596) 2018-08-01 09:12:51 +10:00
ZJ Poh adddf00433 [MRG] np.ones -> np.full (#11628) 2018-07-23 09:49:01 +02:00
Gael Varoquaux 47d3b3c30f [MRG] TST: avoid DeprecationWarning on latest joblib (#11625) 2018-07-20 16:13:50 +02:00
Loïc Estève e1dd0d85c4 FIX: ensure that category warning are passed as a kwargs in ignore_warnings (#11599) 2018-07-17 22:50:32 +02:00
Andreas Mueller 8e2c2aa35d
raise DeprecationWarnings and FutureWarnings as errors (#11570)
Towards #11252.
In the end we'd like to make these errors so we can keep this cleaner in the future.
2018-07-17 15:31:45 -05:00
Joel Nothman 14e7c328df Restructure access to vendored/site Joblib (#11471)
In order to fix #11408, this swaps `joblib` and `_joblib`. It however, allows users to access joblib's `Memory` or `Parallel` functionality without accessing `sklearn.externals._joblib` by importing `Memory`, `Parallel`, etc. into `sklearn.utils`.
2018-07-17 18:02:11 +02:00
Joan Massich 2d7567f9f7 Rework warning in check_array when silent convert string to float (#11577) 2018-07-17 09:17:21 -05:00
absolutelyNoWarranty 46913adf07 [MRG+2] Add common test for set_params behavior (#7760)
* Add set_param check and test

Add check_set_params to test_common
Add assert_is

* Drop extraneous clone

* Put get_params outside loop

* Use more readable name new_params

* Reset params dict every loop

* Make test_values much shorter

* Fix flake8 line too long

* Add extra dict check

* Use deep=False

* Order invariant comparison of dictionary keys

* Raise warnings

* Edit whats new

* Double backticks

* Remove broken link

* fix flake8

* Rewrite whats_new to not start with :

* Fix links to check_estimator

* TST: remove assert_is

No longer needed as we are using pytests
2018-07-16 17:58:55 +02:00
Guillaume Lemaitre f8adfa27ae [MRG] Ignore and pass-through NaNs in RobustScaler and robust_scale (#11308) 2018-07-05 16:34:31 +02:00
Tom Dupré la Tour 0fc7ce6bb8 [MRG+1] Add a stopping criterion in SGD, based on the score on a validation set (#9043) 2018-07-05 16:25:34 +02:00
William de Vazelhes 42e6d4e199 ENH warn_on_dtype for DataFrames (#10949) 2018-06-28 22:00:21 +10:00
Joel Nothman a7e17117bb [MRG] Large sparse matrix support (#11327) 2018-06-25 15:15:11 +00:00
Guillaume Lemaitre 5718466bb5 [MRG] ENH: Ignore NaNs in StandardScaler and scale (#11206) 2018-06-21 15:48:38 +02:00
jeremiedbb 0d8a04bd17 [MRG+1] SimpleImputer(strategy="constant") (#11211) 2018-06-20 17:20:33 +02:00
Mark Roth c50dc0ec9a MAINT Fix #9350: Enable has_fit_parameter() and fit_score_takes_y() to work with @deprecated in Python 2 (#11277) 2018-06-20 12:58:23 +10:00
Scott Gigante 56dc3742e0 Add sparse efficiency warning to randomized_svd for dok_matrix / lil_matrix (#11264) 2018-06-17 14:25:30 +00:00
Shangwu Yao cb1dbc25a7 MNT: reduce the number of warnings in test_common.py (#11151)
Improve handling of warning filters in sklearn.utils.testing by avoiding to reset warnings.filters.
2018-06-11 08:59:12 +02:00
Roman Yurchak e8d8b8eeb0 TST: parametrize unit tests (#11074)
yield tests are deprecated in pytest and will be removed in pytest 4.0.
They all have been replaced by parametrize.
2018-06-08 14:59:33 +02:00
Guillaume Lemaitre b9f3758dfd MAINT add function to ignore nan in min/max sparse functions (#11196) 2018-06-07 06:57:30 +10:00
Joel Nothman 989f9c7647 FIX check_methods_subset_invariance where estimator produces sparse output (#11173) 2018-06-04 11:39:18 +02:00
Joel Nothman ef8d22af7c
ENH Add working_memory global config for chunked operations (#10280) 2018-05-25 12:04:05 +10:00
Danil Baibak 1bee35bf22 TST Added test for the compute_class_weight (#10318) 2018-05-02 11:16:37 +08:00