szl-model-evaluation
Scores binary predictions (Brier, log loss, ECE, MCE, AUROC, accuracy, reliability bins, per-cohort) or saved categorical outputs joined to retained targets, and audits a multi-run evaluation plan so failed, timed-out, invalid and missing attempts stay in the denominator. Use when the user reports held-out model quality, asks whether a classifier is calibrated, or when a 'best of N runs' number needs its full attempt ledger. Not for regression, survival or multiclass metrics, and it does not run inference.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- szl-model-evaluation
- license
- Apache-2.0
- description
- Scores binary predictions (Brier, log loss, ECE, MCE, AUROC, accuracy, reliability bins, per-cohort) or saved categorical outputs joined to retained targets, and audits a multi-run evaluation plan so failed, timed-out, invalid and missing attempts stay in the denominator. Use when the user reports held-out model quality, asks whether a classifier is calibrated, or when a 'best of N runs' number needs its full attempt ledger. Not for regression, survival or multiclass metrics, and it does not run inference.
02 资源文件 5
- 资产文件assets/attempts-example.json709 B
- 资产文件assets/example.json285 B
- 脚本kernel.py15.1 KB
- 参考文档references/contracts.md4.1 KB
- 脚本scripts/run.py3.8 KB
03 SKILL.md 正文
Model evaluation with complete denominators
A success-only score is a different number from a whole-plan score. This skill computes both and keeps every attempt visible. Python 3.10+, stdlib, offline. The calibration metrics are adapted from the Apache-2.0 SZL calibration implementation.
Use when
- "Is this diagnostic classifier calibrated, or just accurate?" (ECE/MCE with reliability bins).
- A paper reports accuracy from the three runs that finished and not the two that crashed.
- Saved categorical outputs (triage labels, cell-type calls) need rescoring against retained targets instead of trusting stored correctness flags.
- A cohort breakdown is needed (by site, sex, device) without re-running the model.
Quick start
python scripts/run.py assets/example.json
python scripts/run.py assets/attempts-example.json
The first synthetic fixture returns "status": "COMPUTED_ON_SUPPLIED_PREDICTIONS" with
brier 0.025, log_loss 0.164, ece 0.15, mce 0.2, auroc 1.0, accuracy 1.0, a confusion
matrix and five reliability bins. The second routes to the attempt ledger and returns
"status": "INCOMPLETE_ATTEMPT_LEDGER": planned 7, recorded 6, attempted 5, completed 2,
successful 1, planned accuracy 1/7 with every non-success counted as incorrect.
Three modes, one entry point
Inputs containing planned_attempts route to the ledger (szl_audit_attempts), inputs with
records route to categorical scoring (szl_evaluate_categories), everything else routes to
binary scoring (szl_evaluate_predictions). Read references/contracts.md for field names.
Before interpreting any score, fix the target population, retained labels, split construction and predeclared threshold and bin count. Keep observed outputs separate from declarations about model revision, tokenizer, inference settings and training overlap. Single-class AUROC is null. Repeated row ids are repeated attempts, not independent samples. A retained plan digest detects changed plan bytes; it does not prove preregistration.
What it does not do
No provider calls, model loading, downloads, uploads or promotion. It cannot verify model origin,
split independence or status declarations, and never imputes probabilities for missing attempts.
Conditional metrics over successful outputs must not be reported as whole-plan performance.
Agent efficacy and scientific performance remain NOT_MEASURED; energy is null without a measurement.
04 同仓库更多 Skills
szl-unit-invariants
Checks declared SI dimensions, allowlisted unit conversions, expected ranges and fixed pointwise invariants (equal, sum, difference, product, ratio) over selected measurement or simulation columns, flagging incompatible quantities, scale errors of 1000x and broken conservation checks. Use when merging instrument exports with different units, validating simulation output against conservation laws, or when a reviewer asks how unit errors were ruled out. Not an uncertainty-propagation or symbolic tool.
szl-uncertainty-lineage
Propagate declared measurement uncertainty through a small arithmetic dependency graph using a first-order delta approximation. Use when a researcher needs to see how corrected inputs or shared-source correlation change a reported standard uncertainty; require unit checks separately.
szl-typesafe-ai
TypeSafe/Jev: Choice/Noul/Score in code, not TypeScript types. System One models turn natural language and application state into probabilities that software can compose. Use when building routing, ranking, extraction, verification, or replacing an LLM prompt-and-parse step with structured decisions; also when brainstorming what TypeSafe could make possible. Do not use for TypeScript/Java/Rust static types, Zod/Pydantic/mypy/JSON Schema/protobuf codegen, or asking whether a pipeline is type-safe. At SZL, Jev is an optional second reader only.
demo
暂无简介
demo
暂无简介
szl-skill-update-review
Compare pinned local skill packages using inventories and a retained lock; report changed skills, files, declarations and reruns without approving safety or validity.