(ts, lam, floor)
| 34 | by = {m["model"]: m for m in SUMMARY} |
| 35 | |
| 36 | def acc(ts, lam, floor): |
| 37 | xs = [] |
| 38 | for t in TIERS: |
| 39 | s = ts.get(t) |
| 40 | if not s or not s.get("total"): xs.append(0.0); continue |
| 41 | v = (s["correct"] + lam*s["wrong"]) / s["total"] |
| 42 | xs.append(max(v, 0.0) if floor else v) |
| 43 | return float(np.mean(xs)) |
| 44 | |
| 45 | opens = [m for m in SUMMARY if CFG.get(m["model"],{}).get("type")=="open" |
| 46 | and CFG.get(m["model"],{}).get("params_B") and CFG[m["model"]]["params_B"]>0 |