Repository navigation
v0.3.0
Scalar-property attribution is now a first-class, domain-neutral
engine; the fairness module is a thin vocabulary layer over it. No
compatibility shims.
Added
- Engine (top level):
Functional(a scalar function of per-sample
model scores or losses on a reference set, with optional analytic
gradient), attributed byFunctionalInfluence(closed form),
RefitFunctionalInfluence(exact leave-one-out), and
SubsampledFunctionalInfluence(Monte-Carlo subsets); evaluated by
functional_value(model, X, F, y).fitis functional-independent:
one fitted attributor can explain any number of functionals via
explain(..., functional=...). pyinfluence.functionals: builders with analytic gradients —
mean(of),group_gap(groups, keep=None, of),cohens_d(groups),
worst_group_mean(groups, of), andauroc(pos_label). Each is
validated against exact refitting in the test suite.
Changed (breaking)
pyinfluence.fairnessnow provides vocabulary and workflow only:
disparity(metric, sensitive, *, target_of=... | pos_label=...)maps
'dp'/'eopp'/'fpr'/'worst_group_loss' onto the builders;
disparity_value(_hard),group_removal_effect, and
disparity_removal_curvekeep their signatures (metricaccepts a
name or anyFunctional).- Removed
FairnessInfluenceFunctions,RefitFairnessInfluence, and
SubsampledFairnessInfluence(replaced by the engine classes plus
disparity), the raw-callable metric form, and the top-level
re-exports of fairness utilities. cohens_dmoved topyinfluence.functionalsas a builder returning
aFunctionalwith an analytic gradient.