Commit Graph

59 Commits

Author SHA1 Message Date
Jérémie du Boisberranger 34f9dbf541
MNT Clean fixes and compat for old versions of our dependencies (#22642)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2022-03-02 11:32:06 +01:00
Thomas J. Fan 82df48934e
MNT Applies black formatting to most of the code base (#18948) 2021-06-17 14:21:09 -04: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
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
Thomas J Fan b84428e796 TST Updates test for deprecation in pandas.SparseArray (#16040) 2020-01-14 19:44:04 +08:00
Nicolas Hug b92455a6b2 MAINT Deprecate all of utils.testing except all_estimators (#15367) 2019-10-28 17:28:56 +01:00
Léonard Binet 846e6a38b0 ENH Support for list of lists or list of arrays multilabel indicator (continuation) (#14865) 2019-10-25 11:37:18 +11: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 411455ec8e MAINT Revert changes in test_multiclass.py 2019-09-11 13:22:54 +02:00
Joel Nothman 15f24f25d0 DOC Cleaning for what's new 2019-09-11 19:08:07 +10:00
Thomas J Fan cc64397d0c FIX Errors for pandas sparse arrays as target (#14125) 2019-07-19 09:58:00 +02:00
Adrin Jalali 19c068a2ec MNT towards removing assert_equal, etc (#14222) 2019-07-01 09:13:32 -04:00
Jonathan Ohayon d045c1abc8 [MRG+2] Change ovr_decision_function scale (#10440)
* unit test for _ovr_decision_function

* sigmoid scale

* error on subset test

* clearer comment on test

* new scaling function forget sigmoid

* remove exception in subset check for SVC decision_function

* add comment and update whats_new

* update comment

* change test for float imprecision

* use 1/3 instead of 1/2

* merge conflict error

* flake8 correction and assert_true replacement

* better comment

* refer to public functions

* remove reference to private function

* rst dots

* change fix comments
2019-02-28 15:04:50 +01:00
Roman Yurchak 0e3bb17e62 MAINT Run pyupgrade following Python2 deprecation (#12997) 2019-02-08 20:13:34 +08:00
surgan12 62d2059804 MNT remove __future__ imports (#12791) 2019-02-02 22:05:06 +08: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
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
ksemb 77418a0275 MAINT Fix escape sequences that are deprecated in Python 3.6 (#10578)
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
2018-02-07 10:41:21 +11:00
nielsenmarkus11 3a48f0ab7c [MRG+1] Raise error when SparseSeries is passed into classification metrics (#7373)
* Raise error when SparseSeries is passed into roc_curve

* Changed "y_true" in second if block to "y_score"

* Remove code to import pandas and add sparseseries check to 'type_of_target' function. Finally, add 'type_of_target' call to _binary_clf_curve

* Remove pandas import and old comparison in roc_curve.

* Add test for 'type_of_target' function

* Add white space after commas

* Correct other white space issues

* Move type_of_target test into try clause, remove test_precision_recall_curve_pos_label since as multiclass it doesn't make sense

* Add test_precision_recall_curve_pos_label back in and also add test_binary_clf_curve to test new logic in _binary_clf_curve function

* Correct syntax and formatting.

* Remove trailing white space

* Correct validation logic

* Update test_multiclass.py per @jnothman 's request.

* Import SkipTest function.

* Remove extra white space from line 303
2017-10-06 17:00:39 +02:00
Russell Smith 54b0e4bf62 Add OneVs{One,All}Classifier._pairwise: fix for #7306 (#7350) 2016-09-20 13:46:45 +02:00
Loïc Estève 45e9c2f5b9 NotAnArray.__array__ should take an optional dtype 2016-08-26 10:19:46 +02:00
seales 0485ada58b General spelling fixes 2015-12-16 09:46:42 -08:00
Jiali Mei 85223b9bcc a common test to check if classifiers fail when fed regression targets 2015-10-14 14:46:13 -04:00
Raghav R V 18221db9fd FIX type_of_target will now raise ValueError on ml-seq; [[1, 2]] is mc-mo; 2015-08-11 22:27:15 +05:30
Raghav R V c031b39787 MAINT is_label_indicator_matrix --> is_multilabel 2015-08-11 22:27:15 +05:30
Raghav R V 7def0a75cd TST/MAINT reintroduce mixed types test sans seq. of seq. 2015-08-11 22:27:15 +05:30
Raghav R V 8f1ad4437f FIX 2D binary array-like must be considered as unknown 2015-08-11 22:27:14 +05:30
Raghav R V 72f6225f7b MAINT/ENH inline the logic for _is_sequence_of_sequences 2015-08-11 22:27:14 +05:30
Raghav R V 664d78eb7c MAINT Remove support for the deprecated sequence of sequences
MAINT Remove sequence of sequence support from datasets
MAINT Remove return_indicator param
MAINT Remove multilabel-seq test in OVR
MAINT Remove multilable-seq test in check_cv
MAINT Remove multilabel seq test in label_binarizer
TST type_of_target returns "unknown" for multilabel-sequence types
TST _check_targets should raise a ValueError
DOC show multilabel indicator as an example; remove return_indicator param
DOC use consistent lower case y for target
2015-08-11 22:26:44 +05:30
Andreas Mueller a8626b36a6 TST/COSMIT remove nose call boilerplate 2015-05-28 14:54:01 -04:00
Raghav R V cd2ee7e454 MAINT docstring --> comments to prevent nose from using doc in verbose mode 2015-03-21 11:16:49 +05:30
Raghav R V 88555987cc PEP8 Fix E101, E111 errors and W191, W293, W293 and W391 warnings. 2015-01-08 04:28:24 +05:30
Hamzeh Alsalhi 2198a84388 Manage explicit zeros manualy in class_distribution, test with explicit zeros 2014-08-09 10:33:35 -04:00
Hamzeh Alsalhi 2203422d0d Combine sparse and dense test for class_distribution 2014-08-09 09:56:09 -04:00
Hamzeh Alsalhi 2a3f504f1c Make cosmetic adjustments, Fix random.py header, use message with assert_warns 2014-08-08 18:48:23 -04:00
Hamzeh Alsalhi 1873ef867c Test explicit sample wieghts in the sparse case of class_distribution 2014-08-07 17:20:07 -04:00
Hamzeh Alsalhi 6c6ef87431 Test class_distribution w/ multioutput-multiclass sparse and dense 2014-08-05 10:09:52 -04:00
Hamzeh Alsalhi 5ba7df8b6c Include dense case support in class_distribution, pep8 revisions
Make The function previoulsy sparse_class_distribution support both the sparse and
dense case, and make some cosmetic updates for imporved readability
2014-08-05 09:45:20 -04:00
Hamzeh Alsalhi 81f82682d6 Move test_sparse_class_distribution to utils/multiclass from utils/sparsefuncs 2014-08-04 18:24:07 -04:00
Gael Varoquaux 7768a3059b ENH: enable y to only implement the array interface
For instance y could be a pandas' dataframe
2014-07-17 11:44:07 +02:00
Andreas Mueller be5826d6b9 BUG: Support array interface 2014-07-16 15:30:39 +02:00
Hamzeh Alsalhi 2bfca14c49 ENH sparse matrix support in label binarization 2014-06-25 16:15:19 -04:00
Joel Nothman 28eb1ebe15 Assert or ignore all sequence of sequences deprecation warnings 2014-06-05 11:20:36 +02:00
Joel Nothman de7bee4f22 ENH support multiclass targets of string objects 2013-12-05 21:56:54 +11:00
Arnaud Joly a9197f3dad FIX bug with indicator format 2013-07-08 13:49:25 +02:00
Arnaud Joly 6c68cac70a COSMIT 2013-07-08 13:49:25 +02:00
Arnaud Joly 33016ed7b9 TST add smoke test for all supported format 2013-07-08 13:49:25 +02:00
Arnaud Joly aef47a751a ENH check that we don't mix number and strings 2013-07-08 13:49:25 +02:00