Xiao Yuan
407070b27d
TST Extend tests for `scipy.sparse.*array` in `sklearn/utils/tests/test_class_weight.py` ( #27188 )
2023-08-28 14:46:50 +05:00
Brendan Lu
fbdc7b3cac
MAINT Parameters validation for sklearn.utils.class_weight.compute_class_weight ( #26512 )
...
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2023-06-29 14:15:25 +02:00
Abhishek Singh Kushwah
a5cc3ab55f
MAINT Added parameter validation for sklearn.utils.class_weight.compute_sample_weight ( #26564 )
...
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2023-06-29 12:05:57 +00:00
Adrin Jalali
42173fdb34
MNT add isort to ruff's rules ( #26649 )
2023-06-21 17:50:07 +02:00
Christian Veenhuis
559609fe98
MAINT Fix several typos in src and doc files ( #26187 )
2023-04-17 21:35:24 -04:00
kernc
00c13632b5
FIX Make compute_sample_weight work on sparse target ( #23115 )
...
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-05-06 15:03:01 +02:00
Thomas J. Fan
3605c140af
FIX Support extra class_weights in compute_class_weight ( #22595 )
2022-03-07 10:31:25 +01:00
Thomas J. Fan
1fc86b6aac
MNT Update black to stable version ( #22474 )
2022-02-15 11:36:26 +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
e770715c43
MNT Completes position arg deprecation ( #17272 )
...
* ENH Adds public functions with position args warning
* BUG Circlar import
* STY
* BUG Add keywords
* BUG Fixes warnings
* ENH Adds other public functions
* CLN Suggestion
* CLN Suggestion
* REV Revert pairwise
* ENH Positoinal args for compute_class_weight
2020-05-19 09:07:25 +02:00
Nicolas Hug
76ef8b0ef0
API kwonly for utils ( #17046 )
...
* kwonly for utils
* More
* fixed some
* some more
* iwannagohomepls
* accept_sparse not kwonly anymore
2020-04-27 15:42:01 +02:00
Roman Yurchak
f621d8a392
Revert "API kwonly for utils ( #17007 )" ( #17045 )
2020-04-26 18:30:09 +02:00
Nicolas Hug
81c1e9d1f2
API kwonly for utils ( #17007 )
2020-04-26 18:05:16 +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
Nicolas Hug
b92455a6b2
MAINT Deprecate all of utils.testing except all_estimators ( #15367 )
2019-10-28 17:28:56 +01:00
Adrin Jalali
19c068a2ec
MNT towards removing assert_equal, etc ( #14222 )
2019-07-01 09:13:32 -04:00
Roman Yurchak
ccd3331f7e
MNT remove unused imports ( #14021 )
2019-06-04 23:15:19 +10:00
Guillaume Lemaitre
c28ef9ef2a
DEP change the default of multi_class to 'auto' in logistic regression ( #13807 )
2019-05-22 09:57:15 -04:00
Guillaume Lemaitre
7896b21562
MNT change default of solver in LogisiticRegression ( #13805 )
2019-05-08 21:31:39 +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
da0cb32270
FIX Use take instead of choose in compute_sample_weight ( #12165 )
2018-09-27 21:51:49 +08: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
Danil Baibak
1bee35bf22
TST Added test for the compute_class_weight ( #10318 )
2018-05-02 11:16:37 +08:00
Marc Meketon
a0db45db0e
[MRG+1] Fix message formatting in exception ( #8319 )
...
when the missing class label is a string.
2017-02-21 10:03:38 +01:00
Andreas Mueller
5c4b1bb231
[MRG+1] Housekeeping Deprecations for v0.19 ( #7927 )
...
* remove stuff to be removed 0.19
* more changes
* remove classes from 0.19 whatsnew
* remove _LearntSelectorMixin
* remove ProjectedGradientNMF, load_lwf_*
* minor fixes
* remove more copy from logistic regression path
* remove lda, qda from __init__.__all__
* remove pg solver in nmf from tests etc
* remove class_weight="auto" from tests
* doctest change for decision_function_shape="ovr"
* remove transfrom from tree test, minor fixes to tree tests
* some fixes in the tests
* undo changes in functions which still allow 1d input...
* also allow 1d in scale
* more test fixes...
* last test fixes in forest and tree
* svm default value change doctest failures
* pep8
* remove more class_weight="auto" stuff
* minor cosmetics in docstrings deprecated / removed behavior.
* say that store_covariance has been moved to __init__ in discriminant_analysis
2016-12-09 12:43:38 -05:00
Gilles Louppe
1784bf3f26
Merge pull request #5863 from trevorstephens/cw_util_fix
...
[MRG] Fix for missing classes found in y - Fixes #4327
2016-02-11 11:42:47 +01:00
seales
0485ada58b
General spelling fixes
2015-12-16 09:46:42 -08:00
trevorstephens
2738d59ab4
fix for missing classes found in y #4327
2015-11-16 16:36:01 -08:00
Andrew Lamb
9ec03c276f
Change formatting of `assert_raise_message`.
2015-09-13 09:16:25 -07:00
Andrew Lamb
f01a695ca8
Fix assertion for Python 3, use `assert_raise_message`.
2015-09-12 11:48:41 -07:00
Andrew Lamb
581056774a
Fix check in `compute_class_weight`.
...
In https://github.com/scikit-learn/scikit-learn/issues/4921 , if a key in `class_weights`, a user-specified dictionary of classes, is not present in `classes`, an error should be raised.
Added unittest.
2015-09-12 10:19:24 -07:00
Andreas Mueller
2ddb503b59
Cosmit readability improvements and better whatsnew.
2015-06-01 12:56:21 -04:00
Andreas Mueller
eedc1cddab
Use more natural class_weight="auto" heuristic
2015-06-01 12:49:53 -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
trevorstephens
f2431db3ec
add test for None class_weights
2015-02-05 07:42:13 -08:00
trevorstephens
965bf51636
use safe in1d, use compute_sample_weight in ridge
2015-02-01 14:28:01 -08:00
trevorstephens
c5fadff91c
add compute_sample_weight util
2015-01-31 18:26:41 -08:00
Lars Buitinck
b97fb3c5fc
MAINT drop support for NumPy < 1.6.1
2014-03-02 20:13:57 +01:00
Manoj-Kumar-S
566237dbab
FIX: Label encoding done in compute_class_weight
...
Changed API such that weight[i] corresponds to sorted_weight[i].
2014-03-01 17:04:55 +01:00
Andreas Mueller
ffad26a299
FIX compute_class_weight edge case
2013-03-06 23:41:24 +01:00
Lars Buitinck
dc2c5c42c9
FIX + TST + DOC compute_class_weight
...
Fixes #1746 , #1747 . Bug reported and fix proposed by @gatagat.
2013-03-06 22:59:02 +01:00
Lars Buitinck
6bf90fe436
TST compute_class_weight in utils
2013-03-06 21:35:54 +01:00