Commit Graph

43 Commits

Author SHA1 Message Date
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
Arnaud Joly 91e4b9a91f ENH use type_of_target within unique_labels 2013-07-08 13:49:24 +02:00
Arnaud Joly adcb0a811e ENH don't allow mix of input multilabel format 2013-07-08 13:49:24 +02:00
Arnaud Joly e3ca5c13eb FIX issue with comparable but different dtype 2013-07-08 13:49:24 +02:00
Arnaud Joly e40a7f56f0 FIX unique_labels in corner case 2013-07-08 13:49:24 +02:00
Joel Nothman 1b3b0c2c52 FIX numpy 1.3 has no float16; use float32 2013-06-10 10:59:48 +10:00
Joel Nothman 210cefa5d5 FIX cannot use set notation for Py2.6 2013-06-09 22:33:38 +10:00
Joel Nothman fd3bd2d200 FIX/COSMIT helper to identify target types
* Fixes bugs related to simply checking type(..) equality
* Refactors metrics and preprocessing
* Invalidates mix of sequences of sequences and label indicators in
  metrics
* Invalidates row vectors in metrics
* Fixes bug where single-class target led to incorrect F-score
2013-06-09 22:05:56 +10:00
Lars Buitinck 2cb8b5e94b P3K some more fixes in random places 2013-03-08 18:31:35 +01:00
Arnaud Joly 5bcf25fc2f ENH multilabel metrics: accuracy, Hamming, 0-1 loss 2013-03-02 20:41:34 +01:00