sessions of 2026-11-18 (the optimization campaign; three runs without summary, interrupted and rerun)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8a81c53cd9
commit
0cfbd1b7bc
363 files changed
+30822
No files matched your search
+18
@@ -0,0 +1,18 @@
|
||||
# Reads thermal_days.out; for thresholds K on the largest dev2, the labelled and unlabelled instants kept and dropped, per station.
|
||||
# Usage: python3 thermal_split.py <thermal_days.out> K [K ...]
|
||||
import re
|
||||
import sys
|
||||
|
||||
rows = []
|
||||
for line in open(sys.argv[1]):
|
||||
m = re.match(r"(\S+) .* n=\s*(\d+) lab=\s*(\d+) dev2=\[(.*)\]", line)
|
||||
if m:
|
||||
top = [float(x) for x in m.group(4).split(",") if x.strip()]
|
||||
rows.append((m.group(1), int(m.group(2)), int(m.group(3)), top[0] if top else 0.0))
|
||||
for k in map(float, sys.argv[2:]):
|
||||
print(f"K={k}")
|
||||
for st in sorted({r[0] for r in rows}):
|
||||
rs = [r for r in rows if r[0] == st]
|
||||
lab = sum(r[2] for r in rs); unl = sum(r[1] - r[2] for r in rs)
|
||||
lab_drop = sum(r[2] for r in rs if r[3] < k); unl_drop = sum(r[1] - r[2] for r in rs if r[3] < k)
|
||||
print(f" {st:12} labelled {lab:5} dropped {lab_drop:5} | unlabelled {unl:5} dropped {unl_drop:5}")
|
||||
Reference in new issue
Block a user