algorise's picture
download
raw
1.12 kB
import json
import os
import numpy as np
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
V2 = os.path.join(ROOT, "results", "v2")
a = json.load(open(os.path.join(V2, "analysis_v2.json")))
for k, c in a["claims"].items():
print(k, c["verdict"], c.get("n_pass"), "/", c.get("n_checks"))
c3 = a["claims"]["claim3"]
print("claim3 both:", c3["n_datasets_both_baselines_beaten"],
"any:", c3["n_datasets_any_baseline_beaten"],
"regress:", c3["n_datasets_regression"])
print()
for ds in ["moons-hard", "rings", "gauss-xor", "digits-3v8"]:
d = json.load(open(os.path.join(V2, f"ddsvm_v2_{ds}.json")))
h = np.array([[c["hinge_end"] for c in r["ddsvm"]["cycles"]] for r in d["runs"]])
print(f"--- {ds}: wall={d['wall_time_sec']:.1f}s")
print(" hinge mean curve:", np.round(h.mean(0), 6).tolist())
print(" exact zeros total:", int((h == 0).sum()), "of", h.size,
"| final-cycle zeros:", int((h[:, -1] == 0).sum()), "/", h.shape[0])
nz = [j + 1 for j in range(h.shape[1]) if (h[:, j] == 0).any()]
print(" cycles containing any exact zero:", nz[:6])

Xet Storage Details

Size:
1.12 kB
·
Xet hash:
47d6499217814aa0d187fa6e1d13b858ef7f6eb8711cda971310dfd82b222ae6

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.