Add class_weight parameter to Naive Bayes classifiers - #32769
Conversation
## Changes - Added `class_weight` parameter accepting `None`, `'balanced'`, or a dict - Converts class weights to sample weights internally using `compute_sample_weight()` - Multiplies with user-provided `sample_weight` if both are specified - Raises informative error when using `class_weight='balanced'` with `partial_fit` - Updated docstrings for all 5 classifiers - Added comprehensive tests
❌ Linting issuesThis PR is introducing linting issues. Here's a summary of the issues. Note that you can avoid having linting issues by enabling You can see the details of the linting issues under the
|
|
Closing as AI spam. See author's interaction on pandas (pandas-dev/pandas#62818) |
Changes
class_weightparameter acceptingNone,'balanced', or a dictcompute_sample_weight()sample_weightif both are specifiedclass_weight='balanced'withpartial_fitReference Issues/PRs
What does this implement/fix? Explain your changes.
Any other comments?