Witsenhausen route B confirmation: regret spread report
Browse files
results/witsenhausen/route_b_confirm/spread_report.txt
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Route B confirmation (N = 3000 bank, 200 fresh test instances), regret r = J / J_ceiling - 1; source files results/witsenhausen/route_b_confirm/arms_m*_s*.json, key '3000'
|
| 2 |
+
|
| 3 |
+
== m = 1, seed 1: 1 Gaussian (2 parameters); n = 200; best linear pair: median r 174.09%
|
| 4 |
+
generator, controller 2 exact within 1% / 5% / 10%: 76.0 / 87.5 / 89.5% | median r 0.04%, 90th pct 11.62%, max 201.05%, below the reference 1 | misses (r > 1%) 48: median r 7.02%, no better than the best linear pair 1
|
| 5 |
+
lookup, controller 2 exact within 1% / 5% / 10%: 100.0 / 100.0 / 100.0% | median r 0.00%, 90th pct 0.01%, max 0.07%, below the reference 32 | misses (r > 1%) 0: median r n/a, no better than the best linear pair 0
|
| 6 |
+
generator, own denoiser within 1% / 5% / 10%: 46.5 / 56.0 / 61.5% | median r 2.38%, 90th pct 152.90%, max 896.04%, below the reference 0 | misses (r > 1%) 107: median r 50.62%, no better than the best linear pair 3
|
| 7 |
+
lookup, own controller 2 within 1% / 5% / 10%: 100.0 / 100.0 / 100.0% | median r 0.00%, 90th pct 0.01%, max 0.09%, below the reference 19 | misses (r > 1%) 0: median r n/a, no better than the best linear pair 0
|
| 8 |
+
|
| 9 |
+
== m = 2, seed 1: 2-Gaussian mix (5 parameters); n = 200; best linear pair: median r 228.61%
|
| 10 |
+
generator, controller 2 exact within 1% / 5% / 10%: 71.5 / 89.0 / 92.5% | median r 0.18%, 90th pct 5.52%, max 114.52%, below the reference 8 | misses (r > 1%) 57: median r 3.70%, no better than the best linear pair 0
|
| 11 |
+
lookup, controller 2 exact within 1% / 5% / 10%: 43.5 / 84.5 / 92.5% | median r 1.28%, 90th pct 7.63%, max 64.92%, below the reference 3 | misses (r > 1%) 113: median r 2.55%, no better than the best linear pair 0
|
| 12 |
+
generator, own denoiser within 1% / 5% / 10%: 16.0 / 46.0 / 61.5% | median r 6.51%, 90th pct 52.37%, max 447.29%, below the reference 0 | misses (r > 1%) 168: median r 8.52%, no better than the best linear pair 2
|
| 13 |
+
lookup, own controller 2 within 1% / 5% / 10%: 37.5 / 82.5 / 91.0% | median r 1.80%, 90th pct 8.86%, max 76.34%, below the reference 1 | misses (r > 1%) 125: median r 2.70%, no better than the best linear pair 0
|
| 14 |
+
|
| 15 |
+
== m = 4, seed 1: 4-Gaussian mix (11 parameters); n = 200; best linear pair: median r 232.48%
|
| 16 |
+
generator, controller 2 exact within 1% / 5% / 10%: 52.5 / 81.5 / 89.0% | median r 0.81%, 90th pct 11.71%, max 45.36%, below the reference 7 | misses (r > 1%) 95: median r 3.17%, no better than the best linear pair 0
|
| 17 |
+
lookup, controller 2 exact within 1% / 5% / 10%: 13.5 / 43.0 / 63.0% | median r 7.08%, 90th pct 29.83%, max 596.96%, below the reference 2 | misses (r > 1%) 173: median r 8.08%, no better than the best linear pair 1
|
| 18 |
+
generator, own denoiser within 1% / 5% / 10%: 0.0 / 21.5 / 43.0% | median r 12.51%, 90th pct 101.86%, max 527.88%, below the reference 0 | misses (r > 1%) 200: median r 12.51%, no better than the best linear pair 4
|
| 19 |
+
lookup, own controller 2 within 1% / 5% / 10%: 8.5 / 34.5 / 54.0% | median r 8.22%, 90th pct 35.66%, max 599.00%, below the reference 1 | misses (r > 1%) 183: median r 10.00%, no better than the best linear pair 1
|
| 20 |
+
|
| 21 |
+
== m = 4, seed 2: 4-Gaussian mix, GEN seed 2 (not pre-registered); n = 200; best linear pair: median r 232.48%
|
| 22 |
+
generator, controller 2 exact within 1% / 5% / 10%: 54.5 / 79.0 / 84.5% | median r 0.78%, 90th pct 15.48%, max 253.99%, below the reference 5 | misses (r > 1%) 91: median r 4.37%, no better than the best linear pair 0
|
| 23 |
+
lookup, controller 2 exact within 1% / 5% / 10%: 13.5 / 43.0 / 63.0% | median r 7.08%, 90th pct 29.83%, max 596.96%, below the reference 2 | misses (r > 1%) 173: median r 8.08%, no better than the best linear pair 1
|
| 24 |
+
generator, own denoiser within 1% / 5% / 10%: 2.5 / 21.5 / 43.5% | median r 14.82%, 90th pct 126.71%, max 1093.84%, below the reference 0 | misses (r > 1%) 195: median r 16.04%, no better than the best linear pair 4
|
| 25 |
+
lookup, own controller 2 within 1% / 5% / 10%: 8.5 / 34.5 / 54.0% | median r 8.22%, 90th pct 35.66%, max 599.00%, below the reference 1 | misses (r > 1%) 183: median r 10.00%, no better than the best linear pair 1
|
| 26 |
+
|
| 27 |
+
== m = 4, seed 3: 4-Gaussian mix, GEN seed 3 (not pre-registered); n = 200; best linear pair: median r 232.48%
|
| 28 |
+
generator, controller 2 exact within 1% / 5% / 10%: 56.0 / 74.5 / 82.0% | median r 0.82%, 90th pct 17.69%, max 180.50%, below the reference 4 | misses (r > 1%) 88: median r 7.10%, no better than the best linear pair 1
|
| 29 |
+
lookup, controller 2 exact within 1% / 5% / 10%: 13.5 / 43.0 / 63.0% | median r 7.08%, 90th pct 29.83%, max 596.96%, below the reference 2 | misses (r > 1%) 173: median r 8.08%, no better than the best linear pair 1
|
| 30 |
+
generator, own denoiser within 1% / 5% / 10%: 0.0 / 23.0 / 40.5% | median r 14.43%, 90th pct 138.93%, max 545.12%, below the reference 0 | misses (r > 1%) 200: median r 14.43%, no better than the best linear pair 4
|
| 31 |
+
lookup, own controller 2 within 1% / 5% / 10%: 8.5 / 34.5 / 54.0% | median r 8.22%, 90th pct 35.66%, max 599.00%, below the reference 1 | misses (r > 1%) 183: median r 10.00%, no better than the best linear pair 1
|
witsenhausen/route_b_spread.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Route B confirmation: how far the misses are (dc_presentation request 2026-11-20, no new run).
|
| 2 |
+
|
| 3 |
+
Reads the stored per-instance costs of the pre-registered confirmation (results/witsenhausen/route_b_confirm/arms_m{1,2,4}_s1.json,
|
| 4 |
+
key '3000', 200 fresh test instances; m = 4 also seeds 2 and 3) and reports, per source and arm, the regret r = J / J_ceiling - 1
|
| 5 |
+
(J_ceiling = per-instance Lloyd with the exact estimator, 5 restarts): median and 90th percentile over all 200 instances,
|
| 6 |
+
shares with r <= 1%, 5%, 10%, the median r of the instances with r > 1%, and how many of those are no better than the best
|
| 7 |
+
linear pair ('aff', J >= J_aff). Arms: generator with controller 2 computed exactly ('gen_bayes'), lookup = nearest solved
|
| 8 |
+
instance with controller 2 computed exactly ('knn_br_bayes'), as on the family 4 slide; the arms' own controller 2 ('gen',
|
| 9 |
+
'knn_br') as secondary. Run: python -m witsenhausen.route_b_spread [dir] > results/witsenhausen/route_b_confirm/spread_report.txt"""
|
| 10 |
+
import json, sys
|
| 11 |
+
import numpy as np
|
| 12 |
+
|
| 13 |
+
ARMS = (("gen_bayes", "generator, controller 2 exact"), ("knn_br_bayes", "lookup, controller 2 exact"),
|
| 14 |
+
("gen", "generator, own denoiser"), ("knn_br", "lookup, own controller 2"))
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
def main(d="results/witsenhausen/route_b_confirm"):
|
| 18 |
+
print("Route B confirmation (N = 3000 bank, 200 fresh test instances), regret r = J / J_ceiling - 1; source files " + d + "/arms_m*_s*.json, key '3000'")
|
| 19 |
+
for m, s, lab in ((1, 1, "1 Gaussian (2 parameters)"), (2, 1, "2-Gaussian mix (5 parameters)"), (4, 1, "4-Gaussian mix (11 parameters)"),
|
| 20 |
+
(4, 2, "4-Gaussian mix, GEN seed 2 (not pre-registered)"), (4, 3, "4-Gaussian mix, GEN seed 3 (not pre-registered)")):
|
| 21 |
+
R = json.load(open(f"{d}/arms_m{m}_s{s}.json"))["3000"]
|
| 22 |
+
c = np.array([x["ceiling"] for x in R]); aff = np.array([x["aff"] for x in R])
|
| 23 |
+
print(f"\n== m = {m}, seed {s}: {lab}; n = {len(R)}; best linear pair: median r {np.median(aff / c - 1) * 100:.2f}%")
|
| 24 |
+
for k, name in ARMS:
|
| 25 |
+
J = np.array([x[k] for x in R]); r = J / c - 1; miss = r > 0.01
|
| 26 |
+
mm = f"{np.median(r[miss]) * 100:.2f}%" if miss.any() else "n/a"
|
| 27 |
+
print(f" {name:31s} within 1% / 5% / 10%: {np.mean(r <= .01) * 100:5.1f} / {np.mean(r <= .05) * 100:5.1f} / {np.mean(r <= .10) * 100:5.1f}%"
|
| 28 |
+
f" | median r {np.median(r) * 100:6.2f}%, 90th pct {np.percentile(r, 90) * 100:6.2f}%, max {r.max() * 100:7.2f}%, below the reference {int((r < 0).sum())}"
|
| 29 |
+
f" | misses (r > 1%) {int(miss.sum())}: median r {mm}, no better than the best linear pair {int((J[miss] >= aff[miss]).sum())}")
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
if __name__ == "__main__":
|
| 33 |
+
main(*sys.argv[1:2])
|