7b92c9cAdd dataset generation scripts, ML fitting code and reference recordingsJeremy Magland 1"""Prints the error of each retraining run against the number of clips.
2 python3 ml/history.py DATASET_DIR/ml/history.jsonl
3"""
4import json
5import sys
7COLS = ["E", "rho", "h", "Lx", "Ly", "E/rho", "kappa", "area", "aspect"]
8rows = [json.loads(l) for l in open(sys.argv[1]) if l.strip()]
9print(f"{'time':>5} {'clips':>5} " + " ".join(f"{c:>11}" for c in COLS) + " (rel RMS % / R^2)")
10for h in rows:
11 m = h["metrics"]
12 print(f"{h['finished'][11:16]:>5} {h['n_clips']:>5} " + " ".join(f"{m[c]['rel_rms_pct']:5.1f}/{m[c]['r2']:5.2f}" for c in COLS))