concept
Research literacy and reproducibility
Compute matched-run ablation deltas in basis points; descriptive variation only.
Formal Syntax & Structure
artificial-intelligence syntaxartificial-intelligence
paired_delta(full, ablated)Working Example
Example Snippetartificial-intelligence
from fractions import Fraction
def paired_delta(full, ablated): # Maps from the same run IDs to integer scores in basis points. if not full or full.keys() != ablated.keys(): raise ValueError("nonempty matched runs required") if any(type(x) is not int or not 0 <= x <= 10000 for scores in (full, ablated) for x in scores.values()): raise ValueError("invalid score") deltas = [full[k] - ablated[k] for k in sorted(full)] return min(deltas), max(deltas), Fraction(sum(deltas), len(deltas))
full = {"seed1": 8100, "seed2": 8000, "seed3": 7900}ablated = {"seed1": 7800, "seed2": 8100, "seed3": 7800}low, high, mean = paired_delta(full, ablated)print(low, high, str(mean))