Skip to content

Add multi-measure support to Perf/Difference - #31

Merged
mgraffg merged 2 commits into
mainfrom
develop
Aug 21, 2026
Merged

Add multi-measure support to Perf/Difference#31
mgraffg merged 2 commits into
mainfrom
develop

Conversation

@mgraffg

@mgraffg mgraffg commented Aug 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Perf accepts score_func/error_func as a single callable or a list of callables (both can be given simultaneously to mix score-type and error-type measures into one instance), building a composite statistic evaluated on the same paired bootstrap samples — implements the design plan from Plan: Multi-measure API for Perf/Difference (e.g. macro-F1 + macro-recall together) #30.
  • Every metrics.py wrapper exposes a .measure() factory tagged with its BiB direction, so metrics compose, e.g. score_func=[f1_score.measure(average='macro'), recall_score.measure(average='macro')].
  • Perf.best, Perf.difference(), Difference.p_value(), and dataframe()/plot() handle per-column BiB/naming for the multi-measure case; single-measure usage is unchanged (existing tests pass unmodified).
  • Version bumped to 0.2.0.

Closes #30.

Test plan

  • pytest CompStats — 65 passed (52 pre-existing + 13 new), no regressions
  • Manual smoke test of multi-measure Perf/Difference/plot()/dataframe() with real classifiers
  • Deterministic synthetic test isolating the per-column BiB sign logic in best/difference()/p_value()

🤖 Generated with Claude Code

mgraffg and others added 2 commits August 21, 2026 18:24
Perf now accepts score_func/error_func as a single callable or a list of
callables (both can be given simultaneously to mix score-type and
error-type measures), building a composite statistic evaluated on the
same paired bootstrap samples. Every metrics.py wrapper exposes a
.measure() factory tagged with its BiB direction so measures compose,
e.g. score_func=[f1_score.measure(average='macro'), recall_score.measure(average='macro')].

Bump version to 0.2.0.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mgraffg
mgraffg merged commit 89e16e3 into main Aug 21, 2026
8 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.

Plan: Multi-measure API for Perf/Difference (e.g. macro-F1 + macro-recall together)

1 participant