Guillaume Lemaitre
286f0c9d17
DOC fixes references issues given by sphinx ( #27432 )
2023-10-03 20:25:29 +02:00
Mateusz Sokół
cb15a82e64
MAINT: Remove np.in1d and np.trapz usages ( #27140 )
...
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
2023-09-06 17:06:31 +02:00
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
Loïc Estève
f55da6220e
MNT Adjust code after NEP 51 numpy scalar formatting changes ( #27042 )
2023-08-22 11:26:55 +02: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
Adrin Jalali
893d5accaf
MNT Update black to 23.3.0 ( #26110 )
2023-04-06 12:14:16 -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
3ae7c76153
STY Enables black with experimental_string_processing=true ( #20412 )
2021-06-29 09:47:04 +02:00
Thomas J. Fan
82df48934e
MNT Applies black formatting to most of the code base ( #18948 )
2021-06-17 14:21:09 -04:00
Tom Dupré la Tour
f6e6ad2d9e
MNT clean futurewarning for 1.0 | _deprecate_positional_args ( #20002 )
...
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-05-14 11:30:27 -04:00
Frans Larsson
9760d9639f
DOC Fix documentation of defaults in sklearn.utils.class_weight ( #17981 )
2020-07-24 15:37:05 -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
Adrin Jalali
0eebade264
DOC docstring (shape= -> of shape) ( #14640 )
2019-10-02 20:54:32 -04:00
Andreas Mueller
952ef6637a
MRG Drop legacy python / remove six dependencies ( #12639 )
2019-01-03 15:50:05 +02:00
Joel Nothman
da0cb32270
FIX Use take instead of choose in compute_sample_weight ( #12165 )
2018-09-27 21:51:49 +08:00
Naoya Kanai
6579220588
[MRG+1] Drop NumPy < 1.8 ( #8874 )
2017-06-07 17:06:06 +02:00
Lera
8717a159ab
[MRG] Extended explanation of using class_weight in RandomForestClassifier (Issue #6646 ) ( #8838 )
...
* Extended explanation of using class_weight in RandomForestClassifier
* Extended explanation of using class_weight in DecisionTreeClassifier,ExtraTreesClassifier and compute_sample_weight()
* Rephrased description.
* Rephrased description (remove "indicator")
2017-05-09 18:21:12 +10: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
Mikhail Korobov
5a333cdb93
fixed error message for invalid class_weight values
2016-06-02 01:13:57 +05:00
trevorstephens
2738d59ab4
fix for missing classes found in y #4327
2015-11-16 16:36:01 -08:00
Arnaud Rachez
62633f701b
Addressed comments on PR #5451
2015-10-21 10:24:23 +02:00
Arnaud Rachez
5db2adf93c
MAINT Removed deprecated stuff.
2015-10-21 10:24:23 +02: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
eedc1cddab
Use more natural class_weight="auto" heuristic
2015-06-01 12:49:53 -04:00
Gilles Louppe
420daac269
Merge pull request #4190 from trevorstephens/refactor_cw
...
MRG+2: Refactor - Farm out class_weight calcs to .utils
2015-02-06 08:24:27 +01:00
trevorstephens
965bf51636
use safe in1d, use compute_sample_weight in ridge
2015-02-01 14:28:01 -08:00
Loïc Estève
67dcd99d82
TST fix tests with numpy 1.6.1
...
np.bincount raises an Exception with empty input arrays for numpy versions < 1.6.2
Add utils.fixes.bincount to tackle this issue and use it instead of np.bincount
2015-02-01 15:49:49 +01: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
Robert Layton
dacfd8bd5d
DOC: Replaced all BSD style licenses with "BSD 3 clause"
...
Replaced all BSD style licenses with "BSD 3 clause"
Not checked yet!
Removed duplicate "3 clause, 3 clause"
Removed trailing period if exists
Fixed some missed licences, still about 50 to do, but those can be automated
Think I got the last of them.
Apparently me and sed have different ideas of regex.
Found a few more
2013-04-30 08:34:46 +02:00
Stefano Lattarini
67ece78da4
COSMIT various typofixes
...
As suggested by codespell <https://github.com/lucasdemarchi/codespell >
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2013-04-11 21:22:14 +02:00
Lars Buitinck
29ed168831
BUG fix compute_class_weights issue in SGD
...
Fixes #1749 .
2013-03-08 17:33:08 +01:00
Andreas Mueller
ffad26a299
FIX compute_class_weight edge case
2013-03-06 23:41:24 +01:00
Lars Buitinck
9633d9d46c
ENH use bincount in compute_class_weight
...
As suggested by @amueller.
2013-03-06 23:04:08 +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
Andreas Mueller
59b5602346
DOC more accurate comment in class weight computation
2013-01-12 18:37:08 +01:00
Andreas Mueller
1c1538af87
ENH move utility function into dedicated file, not __init__.py
2013-01-03 13:28:10 +01:00