Skip to content

Commit

Permalink
[DOC] Updated docstring to clarify class_weight parameter in MRHydraC…
Browse files Browse the repository at this point in the history
…lassifier (#2505)

* Updated docstring to clarify class_weight parameter in MultiRocketHydraClassifier

- Updated the class_weight parameter docstring in MultiRocketHydraClassifier to clarify supported values.

- Explicitly mentioned that "balanced_subsample" is not supported as it is specific to ensemble models and not applicable to RidgeClassifierCV.

* Fix: Refactor long line in _mr_hydra.py to comply with E501 (line length limit)

Edited line 42 that exceeded the 88-character limit (E501).

* Fix: Refactor line 42 in _mr_hydra.py to comply with E501

* Automatic `pre-commit` fixes
  • Loading branch information
Akhil-Jasson authored Jan 24, 2025
1 parent b21754e commit e8a633e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions aeon/classification/convolution_based/_mr_hydra.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@ class MultiRocketHydraClassifier(BaseClassifier):
Number of kernels per group for the Hydra transform.
n_groups : int, default=64
Number of groups per dilation for the Hydra transform.
class_weight{“balanced”, “balanced_subsample”}, dict or list of dicts, default=None
class_weight{None, “balanced”}, dict or list of dicts, default=None
From sklearn documentation:
If not given, all classes are supposed to have weight one.
If None, all classes are assigned equal weights.
The “balanced” mode uses the values of y to automatically adjust weights
inversely proportional to class frequencies in the input data as
n_samples / (n_classes * np.bincount(y))
The “balanced_subsample” mode is the same as “balanced” except that weights
are computed based on the bootstrap sample for every tree grown.
For multi-output, the weights of each column of y will be multiplied.
A dictionary can also be provided to specify weights for each class manually.
Note that these weights will be multiplied with sample_weight (passed through
the fit method) if sample_weight is specified.
Note: "balanced_subsample" is not supported as RidgeClassifierCV
is not an ensemble model.
n_jobs : int, default=1
The number of jobs to run in parallel for both `fit` and `predict`.
``-1`` means using all processors.
Expand Down

0 comments on commit e8a633e

Please sign in to comment.