Commit Graph

1164 Commits

Author SHA1 Message Date
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 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
William de Vazelhes 6b1d8e5e14 FIX warns when invalid n_components in LinearDiscriminantAnalysis (#11526) 2018-12-07 10:31:52 -05: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
Thomas Fan 1b90237b45 FIX Pipeline steps incorrectly updated with passthrough step (#12659) 2018-11-27 00:39:42 +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
Peter 24e46410bd FIX: clone behavior for estimator types (#12585)
Fixes #12521
2018-11-15 07:59:09 +11:00
Hanmin Qin 4b0a70ce5c TST Use NotFittedError instead of ValueError in test_dummy.py (#12579) 2018-11-14 15:23:38 +11:00
Joel Nothman d0e99db0a2 TST don't test utils.fixes docstrings (#12576) 2018-11-13 16:25:11 +01: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
Thomas Fan 9f842e3496 API Adds passthrough option to Pipeline (#11674) 2018-11-05 13:21:57 +11:00
Nicolas Hug 4e2da4af92 [MRG] Added FutureWarning in sgd models for tol parameter (#12399)
* Added ChangedBehaviorWarning in sgd models

if tol is None while max_iter is set

* Changed to FutureWarning and clarified None meaning

* Ignored warningin tests

* Ignore warnings in tests, round 2
2018-10-24 11:00:43 -04:00
Edward J Brown b498ac78dc ENH Raise descriptive ValueError if number of samples equals number of classes in Linear Discriminant Analysis (#12391) 2018-10-23 18:05:53 +11: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 1e052e9da9 Converting http to https (2)... (#12292) 2018-10-04 23:06:14 +02:00
Roman Yurchak dfd009d61e Remove test_import_sklearn_no_warnings (#12244) 2018-10-02 12:13:48 -04:00
Oliver Rausch 84dd57b7b6 [MRG] Update test_metaestimators to pass y parameter when calling score (#12089) 2018-09-20 18:02:29 +10:00
Roman Yurchak b91cbda20d [MRG] MNT Re-enable PyPy CI (#12039) 2018-09-18 23:09:07 +02:00
Joan Massich 6de7957d97 TST Ignore warnings in common test to avoid collection errors (#12093) 2018-09-17 09:53:31 +10:00
Hanmin Qin 781edc4108 MNT Duplicate import in test_pipeline.py
Travis failed to detect it in #11640
2018-09-14 09:15:04 +08:00
Thomas Fan 5be05c64d9 ENH Adds drop in FeatureUnion (#11640) 2018-09-13 23:20:43 +08:00
Rüdiger Busche 3ee1cfc873 ENH Allow scoring of dummies without testsamples (#11957) 2018-09-13 18:03:59 +10:00
Olivier Grisel d3d09c383c
MAINT skip joblib vendor test on debian (#12027) 2018-09-06 14:44:10 +02: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
Nicolas Hug 72b2ed9ee1 DOC Added docstring checks for dataset module (#11407) 2018-07-24 10:57:13 +10:00
ZJ Poh adddf00433 [MRG] np.ones -> np.full (#11628) 2018-07-23 09:49:01 +02:00
Nicolas Hug 6d15840432 DOC Fixed doc issues for utils module (#11445) 2018-07-22 15:23:11 +10:00
Gael Varoquaux 47d3b3c30f [MRG] TST: avoid DeprecationWarning on latest joblib (#11625) 2018-07-20 16:13:50 +02:00
Ronan Lamy 5592a2eda9 [MRG] PyPy support for all but a couple of estimators (#11010) 2018-07-20 14:39:53 +10:00
Nicolas Hug 813d7de9b4 DOC Added docstring checks for feature_selection, kernel_approximation and neighbors modules (#11421) 2018-07-20 08:24:39 +10:00
Alexandre Boucaud f158e2dfe2 [MRG+1] Change CV defaults to 5 (#11557)
* add FutureWarning for methods with defaults=3

* add explicit cv values to fix assertion errors

* add tests for catching the FutureWarning

* Write current deprecation version

* Add deprecation in docstring

* change default cv value to None

* change cv from 3 to 5 in the examples

* upgrade doctests

* update doctest in tutorial

* update doctest in cross-validation doc

* fix tests

* add entry to whats new

* address Gael comments

* address Gael comments 2

* fix wrong indentation

* update doc

* add docstring deprecation warning in CV subclasses

* address Andy's comments

* fix PR number

* fix flake8

* add filterwarnings in tests

* fix doctests

* cv=None mendatory in Ridge

* fix warning related errors

* skip some doctests warnings

* make travis happy

* change from deprecated to versionchanged

* fix doctests and remove skipping

* address comments
2018-07-19 14:46:11 +02:00
Andreas Mueller f6e030aaeb float has no attribute dtype... 2018-07-17 18:39:38 -05:00
Andreas Mueller 2f3cc078ea I swear it'll work now... maybe 2018-07-17 18:20:51 -05:00
Andreas Mueller 6aaa49eab0 be explicit on filling 2018-07-17 18:18:36 -05:00
Olivier Grisel b30e1cd4d0 Ignore DeprecationWarning in test_docstring_parameters caused by numpydoc on Python 3.7 2018-07-18 00:38:11 +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
Joris Van den Bossche f819704880 MAINT: Revert ChainedImputer (#11600) 2018-07-17 21:45:36 +02:00
annaayzenshtat 2242c59fc8 [MRG] EHN: Change default n_estimators to 100 for random forest (#11542)
<!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->

#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to the issues or pull requests
you resolved, so that they will automatically be closed when your pull request
is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests
-->
Fixes #11128.

#### What does this implement/fix? Explain your changes.
Issues deprecation warning message for the default n_estimators parameter for the forest classifiers. Test added for the warning message when the default parameter is used.

#### Any other comments?


<!--
Please be aware that we are a loose team of volunteers so patience is
necessary; assistance handling other issues is very welcome. We value
all user contributions, no matter how minor they are. If we are slow to
review, either the pull request needs some benchmarking, tinkering,
convincing, etc. or more likely the reviewers are simply busy. In either
case, we ask for your understanding during the review process.
For more information, see our FAQ on this topic:
http://scikit-learn.org/dev/faq.html#why-is-my-pull-request-not-getting-any-attention.

Thanks for contributing!
-->
2018-07-17 14:42:59 -05:00
jeremiedbb cd3e0dcf02 [MRG+2] Fix sparse simple imputer (#11496)
* handle explicit zeros in sparse matrix

* add regression test

* remove sparse + missing=0 support

* update tests

* change example remove missing = 0

* fix doc

* fix doc

* adress gael comments + fix doc

* corrected docstring

* fix doc
2018-07-17 21:08:41 +02: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
Nicolas Hug 671fe79a5d [MRG] Added docstring checks for ensemble module (#11418)
* Added docstring checks for ensemble module
2018-07-17 17:02:43 +02:00
Maniteja Nandana 726fa36f25 [MRG+1] MissingIndicator transformer (#8075)
MissingIndicator transformer for the missing values indicator mask.
see #6556 

#### What does this implement/fix? Explain your changes.
The current implementation returns a indicator mask for the missing values.

#### Any other comments?
It is a very initial attempt and currently no tests are present. Please do have a look and give suggestions on the design. Thanks !

- [X] Implementation
- [x] Documentation
- [x] Tests
2018-07-16 14:22:13 -05:00
Guillaume Lemaitre d986354787 [MRG] FIX: raise error with inconsistent dtype X and missing_values (#11391) 2018-07-16 10:04:10 +02:00
Andreas Mueller b25e222328 MNT misc sphinx website build fixes and dead links (#11532) 2018-07-16 09:13:20 +08:00
Nicolas Hug e860fd2d12 DOC parameters for gaussian_process and linear_model modules (#11415) 2018-07-15 16:06:05 +10:00