Commit Graph

427 Commits

Author SHA1 Message Date
Gabriel Vacaliuc 5fc5c6e62e FIX an issue w/ large sparse matrix indices in CountVectorizer (#11295) 2019-01-30 11:06:05 +11:00
Vishaal Kapoor fdf2f3834e DOC Correct TF-IDF formula in TfidfTransformer comments. (#13054) 2019-01-29 17:50:41 +11:00
Thomas Fan 7bc20c0e50 DOC Minor changes to DOCS to address sphinx warnings (#12999) 2019-01-17 17:49:31 +08:00
Reshama Shaikh ff46f6e594 DOC improve tfidfvectorizer documentation (#12822) 2019-01-16 17:49:46 +11:00
Rüdiger Busche d300f406ae MAINT Simplify super() calls (#12812) 2019-01-10 22:27:06 +01: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
Dowon 0e5feb6bf7 DOC improving import convenience in class examples (#12846) 2018-12-23 09:37:43 +08: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
Roman Yurchak 9a7e49f480 MAINT Use unicode in feature_extraction tests (#12709)
* Use unicode in feature_extraction tests

* Add a comment for the alef character

* Set the correct number of words in test_vectorizer_unicode
2018-12-09 12:47:45 +01:00
Dan Stine 92e8fc910f DOC Update TfidfVectorizer analyzer documentation to match CountVectorizer (#12713) 2018-12-03 09:21:02 +08: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
Roman Yurchak eb36c28fd9 FIX stop words validation in text vectorizers with custom preprocessors / tokenizers (#12393) 2018-11-11 21:53:44 +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
Didi Bar-Zev 8408b467f2 ALL Add HashingVectorizer to __all__ (#12534) 2018-11-06 19:39:31 -05:00
Roman Yurchak b91cbda20d [MRG] MNT Re-enable PyPy CI (#12039) 2018-09-18 23:09:07 +02:00
Naoya Kanai 774ae89306 [MRG] Fix numpy FutureWarning (#11704) 2018-07-30 17:40:46 +10:00
Naoya Kanai a1565241a4 Minor FIX Use tuple indices to access ndarray and avoid numpy FutureWarning (#11701) 2018-07-29 14:10:01 +10:00
Ronan Lamy 5592a2eda9 [MRG] PyPy support for all but a couple of estimators (#11010) 2018-07-20 14:39:53 +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
Joel Nothman e0cfc925a1 DOC Document issues with stop words (#11552) 2018-07-18 00:45:05 +02:00
Andreas Mueller b9330d96c9 pep8 whoops 2018-07-17 17:00:41 -05: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
Meghann Agarwal a3f8e65dec DOC Add examples for vectorizer classes (#11534) 2018-07-16 13:16:20 +08:00
Roman Yurchak c09352c241 [MRG] Fix DeprecationWarning due to collections.abc in Python 3.7 (#11431)
Closes https://github.com/scikit-learn/scikit-learn/issues/11121

This PR removes the deprecation warning about ABC being moved from `collections` to `collections.abc` when importing scikit-learn in Python 3.7.

In the end, I put `collections.abc.{Sequence, Iterable, Mapping, Sized}` in the namespace of `sklearn.utils.fixes`. This was the simplest way I could find, and while it has the drawback of obfuscating the real module name, other approached appeared more problematic and a similar approach is currently used e.g. for `utils.fixes.signature` which is an alias for `inspect.signature`.

We can't just patch six with https://github.com/benjaminp/six/pull/241, because sklearn uses six from 5 years ago, which would  need updating and I'm not sure if it could have side effects (e.g. for pickling backward compatibility etc).

**Edit**: This adds a test checking that generally no warnings are raised when importing scikit-learn top-level modules.
2018-07-14 15:14:02 -05:00
Nicolas Hug 175bedbba1 DOC Fixed doc issues for decomposition and feature_extraction modules (#11413) 2018-07-04 21:34:55 +08:00
Loïc Estève b89c83fcad TST: fix scipy-dev-wheels build. (#11359)
Root cause is numpy.matrix PendingDeprecationWarning
2018-06-28 09:21:17 +10:00
Joris Van den Bossche 007aa710bd FEA Refactor CategoricalEncoder into OneHotEncoder and OrdinalEncoder (#10523)
Deprecated some OneHotEncoder behaviour
2018-06-21 19:27:41 +10:00
Mayur Kulkarni 02d0a03ad1 [MRG] FIX TFIDFVectorizer follow parameter dtype and TFIDFTransformer preserve dtype (#10443) 2018-06-14 10:26:34 +10:00
Roman Yurchak f049ec72eb TST Pytest parametrization part3 - feature_extraction, gaussian_process modules (#11143) 2018-06-04 22:23:29 +08:00
Mohamed Maskani 7d3a59eec2 [MRG+1] Add validation of vocabulary in get_feature_names (#10908) 2018-04-25 19:58:34 +02:00
Sergey Melderis f890144c41 [MRG+1] idf_ setter for TfidfTransformer. (#10899) 2018-04-05 13:45:15 +03:00
Roman Yurchak 33e4a7e91a DOC HashingVectorizer.fit_transform docstring (#10911) 2018-04-04 20:45:22 +10:00
Loïc Estève 20661b5018
TST: only run doctests on numpy 1.14. (#10835)
Fix doctests due to numpy 1.14 formatting changes.
2018-03-27 07:44:40 +02:00
Dor Cohen 47ce5e1c9d [MRG+1] Fix validation of ngram_range property in vectorizers (#10777) 2018-03-12 20:38:43 +11:00
Joel Nothman 61e6f50295 DOC improve strip_accents relevance to non-Roman scripts (#10757) 2018-03-07 08:42:30 +08:00
Roman Yurchak e5a5e77d0a [MRG+1] Support for 64 bit sparse array indices in text vectorizers (#9147)
Support new scipy sparse array indices, which can now be > 2^31 (< 2^63).
This is needed for very large training sets.
Feature indices (based on the number of distinct features), are unlikely to need 4 bytes per value, however.
2017-11-30 09:38:26 +11:00
Varun Agrawal 6eb218e301 [MRG + 1] Fix for image.extract_patches_2d when # of patches requested > all possible patches (#10101) 2017-11-25 16:31:58 +01:00
Joris Van den Bossche a2ebb8cfd2 ENH: new CategoricalEncoder class (#9151) 2017-11-21 20:03:41 +11:00
Roman Yurchak e88baeae6a TST Platform independent hash collision tests in FeatureHasher (#9710) 2017-09-12 10:14:32 +10:00
Joan Massich 76494a1462 [MRG+1] Remove hard dependency on nose (#9670) 2017-09-10 13:21:40 +10:00
Kumar Ashutosh b441308f36 Fixes deprecation warning in numpy-dev build (#9683) 2017-09-04 10:00:15 +02:00
RAKOTOARISON Herilalaina d96a462d4e [MRG+1] TST Add test coverage for countVectorizer with ngram_range > 1 (#9318)
* Add coverage countVectorizer

* Add test for analyser=word

* remove redundant test

* Update test

* Change index

* Remove indexing
2017-07-21 14:30:41 -04:00
Minghui Liu 1f5d22bffc [MRG+1] supress deprecation warnings for non_negative option (#9356)
* supress deprecation warnings for non_negative option

* more non_negative option deprecation warnings

* fix flake8 warning
2017-07-15 16:32:14 +02:00
(Venkat) Raghav, Rajagopalan b6f8865b0a [MRG + 1 (rv) + 1 (alex) + 1] Add a check to test the docstring params and their order (#9206)
* add automatic test of docstrings for function / method signatures using numpydoc
2017-07-11 18:42:10 +02:00
Andreas Mueller 5271a193c3 MRG Sphinx fixes (#9155) 2017-06-28 17:00:13 +02:00
Alexandre Gramfort 22f0cf2de9 FIX : signatures of fit_transform != transform (#9220) 2017-06-26 07:24:52 +10:00