majority_sampling_ratio: <list[float]> (Optional)
Description
A list of majority sampling ratios for AutoML to explore. Themajority_sampling_ratio parameter controls undersampling of the majority class in binary classification tasks.It specifies how many majority-class examples to keep per minority-class example during training.
In other words:
For every example in the minority class, we samplemajority_sampling_ratio examples from the majority class.This parameter must be greater than 0.
Behavior
- If the dataset’s actual majority-to-minority ratio is greater than the specified
majority_sampling_ratio, undersampling is applied to reduce the imbalance. - If the dataset’s actual ratio is less than or equal to the specified ratio, the parameter has no effect (i.e., all data are used).
- Majority-class examples: 10,000
- Minority-class examples: 100
→ Actual ratio = 100:1
Resulting sampled data:
- Majority-class examples kept: 100 × 20 = 2,000
- Minority-class examples: 100
→ Resulting ratio = 20:1
Since the dataset is already less imbalanced than the target, no undersampling occurs.
All majority examples are kept, and this setting is ignored. Summary table
| Dataset Majority:Minority | majority_sampling_ratio | Action Taken | Resulting Ratio |
|---|---|---|---|
| 100:1 | 20 | Undersample majority | 20:1 |
| 100:1 | 50 | Undersample majority | 50:1 |
| 100:1 | 100 | No change (equal ratio) | 100:1 |
| 100:1 | 120 | Ignored (ratio already smaller) | 100:1 |
majority_sampling_ratio leads to majority_sampling_ratio being ignored.
Supported Task Types
- Binary Classification
Default Values
| run_mode | Default Value |
|---|---|
| FAST | None |
| NORMAL | None |
| BEST | None |