Skip to content

Commit 2198d43

Browse files
sjarmakclaude
andcommitted
fix: guard stdev call for suites with <2 paired tasks in DOE analysis
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 57f397a commit 2198d43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/doe_variance_analysis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,9 @@ def _output_tables(suites, config_arms, decompositions, combined_decomps,
587587
frac_pos = sum(1 for d in deltas if d > 0.001) / n
588588
frac_neg = sum(1 for d in deltas if d < -0.001) / n
589589

590+
std_d = statistics.stdev(deltas) if n > 1 else 0.0
590591
print(f" {short:<18} {n:>6} {statistics.mean(deltas):>+8.4f} "
591-
f"{statistics.stdev(deltas):>8.4f} {min(deltas):>+8.4f} "
592+
f"{std_d:>8.4f} {min(deltas):>+8.4f} "
592593
f"{max(deltas):>+8.4f} {frac_pos:>7.2f} {frac_neg:>7.2f}")
593594

594595
# ---- Interpretation ----

0 commit comments

Comments
 (0)