benchmark¶
compare ¶
The compare facade: evaluate methods on a task battery and report significance.
compare ¶
compare(
methods,
data,
task="classification",
*,
num_classes=None,
predict_fn=None,
metrics=None,
prob_metrics=None,
test="wilcoxon",
alpha=0.05,
correction="holm",
ignore_index=None,
device=None,
)
Compare methods on a standard battery and report significance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
methods
|
dict[str, Sequence[Module]]
|
|
required |
data
|
Iterable
|
A re-iterable batch source (e.g. a |
required |
task
|
str or Task
|
A registered task name ( |
'classification'
|
num_classes
|
int or None
|
Required (when |
None
|
predict_fn
|
callable or None
|
|
None
|
metrics
|
dict[str, Metric] or None
|
Replaces the task's battery entirely. A custom battery gets no implicit
probability routing — name the probability-consuming entries in
|
None
|
prob_metrics
|
frozenset[str] or None
|
Battery entries fed probabilities instead of hard predictions. |
None
|
test
|
str
|
Statistical test for pairwise method comparison; one of
|
'wilcoxon'
|
alpha
|
float
|
Significance level for the (multiple-comparison-corrected) comparisons. |
0.05
|
correction
|
str
|
Multiple-comparison correction applied per metric across method pairs:
|
'holm'
|
ignore_index
|
int or None
|
Label to exclude from segmentation metrics (e.g. a void/boundary class). |
None
|
device
|
device or None
|
Evaluation device; defaults to the device of each model's parameters. |
None
|
BenchmarkResult
dataclass
¶
Holds benchmark results.
Attributes:
| Name | Type | Description |
|---|---|---|
data |
Dataset
|
Dims |
comparisons |
DataFrame
|
Pairwise significance results (see |
alpha |
float
|
Significance level used. |
summary ¶
Publication-ready table: per method/metric mean and CI, with a
"*" marker when the method differs significantly from reference
(default: the first method in data).