beats_random_baseline
mcda.beats_random_baseline(scores, polarity, baselines, metric_ids=None)
Count, per metric, how many tools score better than chance.
A tool beats chance on a metric when its score is strictly past the declared baseline in the metric’s favourable direction: above the baseline for a higher_is_better metric, below it for lower_is_better. A target_value metric has no chance level, so it is skipped even if a baseline is declared. Metrics without a baseline are skipped.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
scores |
Array-like of shape (n_tools, n_metrics) in native units. |
required | |
polarity |
Sequence[str] | Length n_metrics polarity strings. |
required |
baselines |
Sequence[float | None] | Length n_metrics chance scores, None where the card declares none. Pass beam.mcda.registry_context(...).baselines. |
required |
metric_ids |
Sequence[str] | None | Optional metric ids used to label the per-metric rows. | None |
Returns
| Type | Description |
|---|---|
| RandomBaselineReport |