geno_lewm.evaluation¶
evaluation
¶
Artifact-level evaluation helpers for first-experiment score files.
BinaryEvalResult
dataclass
¶
BinaryEvalResult(split: str, score_field: str, threshold: float, labelled_variants: int, evaluated_variants: int, positive_variants: int, negative_variants: int, extra_score_variants: int, auroc: float, average_precision: float, accuracy: float, balanced_accuracy: float, sensitivity: float, specificity: float, ci_level: float, bootstrap_resamples: int, bootstrap_seed: int, auroc_ci_low: float | None = None, auroc_ci_high: float | None = None, average_precision_ci_low: float | None = None, average_precision_ci_high: float | None = None, accuracy_ci_low: float | None = None, accuracy_ci_high: float | None = None, balanced_accuracy_ci_low: float | None = None, balanced_accuracy_ci_high: float | None = None)
Measured binary evaluation over labelled score records.
evaluated_variant_keys_sha256
property
¶
SHA-256 identity of the sorted evaluated variant-key set, when known.
to_report_metrics
¶
Render metrics in tools.release.eval_report input shape.
Source code in geno_lewm/evaluation.py
to_summary_dict
¶
Return a compact JSON summary for CLI stdout.
Source code in geno_lewm/evaluation.py
ContinuousEvalResult
dataclass
¶
ContinuousEvalResult(split: str, score_field: str, label_field: str, labelled_variants: int, evaluated_variants: int, extra_score_variants: int, spearman_rho: float, ci_level: float, bootstrap_resamples: int, bootstrap_seed: int, spearman_rho_ci_low: float | None = None, spearman_rho_ci_high: float | None = None)
Measured continuous-label evaluation over matched score records.
evaluated_variant_keys_sha256
property
¶
SHA-256 identity of the sorted evaluated variant-key set, when known.
to_report_metrics
¶
Render Spearman correlation in tools.release.eval_report input shape.
Source code in geno_lewm/evaluation.py
to_summary_dict
¶
Return a compact JSON summary for CLI stdout.
Source code in geno_lewm/evaluation.py
evaluate_score_labels
¶
evaluate_score_labels(scores_jsonl: str | Path, labels_jsonl: str | Path, *, score_field: str = DEFAULT_EVAL_SCORE_FIELD, threshold: float = DEFAULT_EVAL_THRESHOLD, split: str = 'eval_clinvar', bootstrap_resamples: int = DEFAULT_BOOTSTRAP_RESAMPLES, bootstrap_seed: int = DEFAULT_BOOTSTRAP_SEED, ci_level: float = DEFAULT_CI_LEVEL) -> BinaryEvalResult
Evaluate score JSONL against held-out ClinVar-style label JSONL.
Source code in geno_lewm/evaluation.py
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | |
evaluate_continuous_score_labels
¶
evaluate_continuous_score_labels(scores_jsonl: str | Path, labels_jsonl: str | Path, *, score_field: str = DEFAULT_EVAL_SCORE_FIELD, label_field: str = 'value', split: str = 'eval_continuous', bootstrap_resamples: int = DEFAULT_BOOTSTRAP_RESAMPLES, bootstrap_seed: int = DEFAULT_BOOTSTRAP_SEED, ci_level: float = DEFAULT_CI_LEVEL) -> ContinuousEvalResult
Evaluate score JSONL against held-out continuous labels using Spearman rho.
Source code in geno_lewm/evaluation.py
build_eval_report_payload
¶
build_eval_report_payload(result: BinaryEvalResult, *, model_id: str, model_release: str, dataset_snapshot: str, commit: str, hardware: str, checkpoint: str | Path, config: str | Path, dataset_manifest: str | Path, eval_config: str | Path, efficiency_report: str | Path, scores: str | Path, labels: str | Path, baseline_result: BinaryEvalResult | None = None, baseline_name: str | None = None, baseline_scores: str | Path | None = None, generated_at: str | None = None) -> dict[str, object]
Build measured metrics JSON accepted by tools.release.eval_report.
Source code in geno_lewm/evaluation.py
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 | |
build_continuous_eval_report_payload
¶
build_continuous_eval_report_payload(result: ContinuousEvalResult, *, model_id: str, model_release: str, dataset_snapshot: str, commit: str, hardware: str, checkpoint: str | Path, config: str | Path, dataset_manifest: str | Path, eval_config: str | Path, efficiency_report: str | Path, scores: str | Path, labels: str | Path, baseline_result: ContinuousEvalResult | None = None, baseline_name: str | None = None, baseline_scores: str | Path | None = None, generated_at: str | None = None) -> dict[str, object]
Build measured continuous metrics JSON accepted by eval_report.