Skip to content

mudra-ml 0.6.0

Choose a tag to compare

@MuditNautiyal-21 MuditNautiyal-21 released this 15 Jun 01:47

mudra-ml 0.6.0 handles imbalanced classification honestly.

On a skewed target a weighted headline score can stay high while the model misses most of the minority class. This release states that miss in plain words and reduces it, with the precision cost shown.

  • The trust summary states the minority-class recall and miss rate in plain words. When the miss is large it becomes the headline risk and the verdict no longer reads as sound.
  • Model selection is aligned to the minority class: minority-class F1 for binary targets, macro F1 for multiclass.
  • Balanced class weights are applied to the estimators that support them. The estimators without a class-weight option lean on the tuned threshold instead, and the report records which got weights.
  • For a binary target the decision threshold is tuned on out-of-fold predictions of the training data only, never the held-out test set. The report shows the held-out precision, recall, and F1 at the tuned threshold next to the default 0.5 cutoff. The threshold is saved with the model and reapplied on load.

Multiclass targets get the class weights, the flag, and macro-F1 selection, but not threshold tuning.

Measured with the optional boosters disabled and the seed fixed at 42, the held-out minority-class recall moved from 0.54 to 0.76 on adult, 0.39 to 0.74 on bank-marketing, and 0.45 to 0.68 on credit-g, at a precision cost shown in the report. The balanced and regression datasets are unchanged.

Full change history: https://github.com/MuditNautiyal-21/mudra-ml/blob/main/CHANGELOG.md