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
+22
@@ -0,0 +1,22 @@
|
||||
"""Per-instant confusion: for each flagged family, the label families of its wrong instants (none = no label), and per variety. Args: detectors_dir station labels from to"""
|
||||
import sys
|
||||
from collections import Counter
|
||||
from pathlib import Path
|
||||
det, folder, lab, start, end = sys.argv[1:6]
|
||||
sys.path.insert(0, str(Path(det) / "bench")); sys.path.insert(0, str(Path(det) / "scripts"))
|
||||
import score
|
||||
from data import iso, load
|
||||
ms = load(folder)
|
||||
labels = score.read_labels(lab, start, end)
|
||||
evts = score.events(ms, start, end, folder)
|
||||
inst = sorted({iso(m["t"]) for v in ms.values() for m in v if start <= iso(m["t"]) < end})
|
||||
c, v = Counter(), Counter()
|
||||
for t in inst:
|
||||
a = {e["family"] for e in labels if e["start"] < t < e["end"]}
|
||||
for fam in {x["category"] for x in evts if x["start"] <= t <= x["end"]} - a:
|
||||
c[(fam, ",".join(sorted(a)) or "none")] += 1
|
||||
for lbl in {x["episodes"][0]["label"] if x.get("episodes") else x.get("text", "")[:30] for x in evts if x["category"] == fam and x["start"] <= t <= x["end"]}:
|
||||
v[(fam, lbl)] += 1
|
||||
for k, n in sorted(c.items(), key=lambda x: -x[1]): print(n, k)
|
||||
print("-- by variety")
|
||||
for k, n in sorted(v.items(), key=lambda x: -x[1]): print(n, k)
|
||||
Reference in new issue
Block a user