leave_one_metric_out

mcda.leave_one_metric_out(scores, polarity, metric_ids=None, weights='equal', method='saw', normalization=None, bounds=None, baselines=None, targets=None, missing='error')

Run the pipeline once with all metrics, then once per metric omission.

For each metric column j, drop column j and re-run beam.mcda.run on the remaining n_metrics - 1 columns with the same weighting and method. Compare every leave-one-out ranking to the base ranking to obtain per-tool rank stability (the fraction of leave-one-out runs with the tool’s base rank unchanged) and the maximum rank shift caused by any single omission.

Parameters

Name Type Description Default
scores Array-like of shape (n_tools, n_metrics). required
polarity Sequence[str] Length n_metrics sequence of "higher_is_better" or "lower_is_better". Use beam.cards.polarities_for to source this from the registry. required
metric_ids Sequence[str] | None Optional length n_metrics sequence of metric ids. Kept in the report for labelling. None
weights Forwarded to run. "equal", "entropy", or an array. 'equal'
method str Forwarded to run. "saw" or "topsis". 'saw'
normalization Optional per-metric normalization context forwarded to run and subset to the kept columns on each omission. Default None keeps the run defaults. Pass the values from beam.mcda.registry_context so the leave-one-out runs normalize the scores the same way as the main ranking. None
bounds Optional per-metric normalization context forwarded to run and subset to the kept columns on each omission. Default None keeps the run defaults. Pass the values from beam.mcda.registry_context so the leave-one-out runs normalize the scores the same way as the main ranking. None
baselines Optional per-metric normalization context forwarded to run and subset to the kept columns on each omission. Default None keeps the run defaults. Pass the values from beam.mcda.registry_context so the leave-one-out runs normalize the scores the same way as the main ranking. None
targets Optional per-metric normalization context forwarded to run and subset to the kept columns on each omission. Default None keeps the run defaults. Pass the values from beam.mcda.registry_context so the leave-one-out runs normalize the scores the same way as the main ranking. None

Returns

Type Description
SensitivityReport