ClassWeightingStrategy
Enums · AiDotNet.Enums
How a class-weighted feature selector turns class frequencies into class weights.
For Beginners
When one class is much rarer than another, these weights make the rare class count more, so the chosen features also separate the rare class well.
How It Works
Every strategy starts from the balanced ratio n / (classes * count) of scikit-learn’s
compute_class_weight("balanced"), so rare classes get larger weights.
Fields
| Field | Summary |
|---|---|
ClassWeightingStrategy Balanced |
The balanced ratio n / (classes * count). |
ClassWeightingStrategy Log |
log(1 + ratio) of the balanced ratio, the mildest correction. |
ClassWeightingStrategy Sqrt |
The square root of the balanced ratio, a milder correction. |
int value__ |