Skip to content

feat: classification default metrics — add log-loss and PR AUC - #67

Merged
rxavier merged 1 commit into
mainfrom
feat/preprocessing-p0-classification-metrics
Aug 3, 2026
Merged

rxavier merged 1 commit into
mainfrom
feat/preprocessing-p0-classification-metrics

Conversation

@rxavier

@rxavier rxavier commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

Implements P0-4 from the ML defaults improvements plan (docs/ml-defaults-improvements.md).

Changes

  • neg_log_loss added to all three default classification metric lists (binary, multiclass, multilabel-indicator).
  • average_precision added to the binary list (PR AUC is informative under class imbalance).
  • roc_auc/roc_auc_ovr stays first so ranking/ensemble behavior is unchanged.
  • predict_proba gating: the proba-requiring metrics are only included when every configured estimator supports predict_proba. Custom estimators without it (e.g. LinearSVC) keep a working default metric set instead of hard-failing in cross-validation (which the existing error-analysis test relied on).
  • Factored estimator resolution out of _build_pipelines into _build_estimators_dict() so _build_metrics can inspect the configured estimators.

Tests

  • Binary defaults include neg_log_loss and average_precision; multiclass/multilabel include neg_log_loss only.
  • Non-proba estimators drop both.
  • Updated multilabel shape test (column count now derived from metrics) and the bounded-scores test (excludes unbounded neg_log_loss).

All 248 tests pass; coverage 89.4% (gate 85%); ruff + format clean.

- Add neg_log_loss to all default classification metric lists and
  average_precision to the binary list, keeping roc_auc first so ranking
  behavior is unchanged
- Gate proba-requiring metrics (neg_log_loss, average_precision) on the
  configured estimators supporting predict_proba: custom estimators without
  predict_proba (e.g. LinearSVC) keep a working default metric set instead of
  hard-failing during cross-validation
- Factor estimator resolution out of _build_pipelines into
  _build_estimators_dict() so metrics can inspect the configured estimators
- Update the multilabel shape test to derive the column count from the metrics

Closes P0-4 of the ML defaults improvements plan.
@rxavier
rxavier merged commit 594c319 into main Aug 3, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant