Skip to content

feat(kinetics): too-few-points warning, intercept checks, 'Pseudo-first (initial drop)' model - #14

Merged
Hj1308 merged 5 commits into
mainfrom
claude/nifty-dirac-57byzj
Oct 2, 2026
Merged

Hj1308 merged 5 commits into
mainfrom
claude/nifty-dirac-57byzj

Conversation

@Hj1308

@Hj1308 Hj1308 commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Tab 1 warns when a catalyst has fewer than MIN_FIT_POINTS informative points (t = 0 anchor not counted): AICc then over-penalises 2-parameter models and cannot evaluate 3-parameter ones. The summary gains an n (fitted) column.
  • Tab 2 checks linearisation intercepts against theory (95 % CI, anchor excluded) via the new catlab.metrics.linear_intercept_check. A PFO line that misses the origin warns about a fast initial removal step and estimates its size (100·(1 − e^(−a))). A PSO mismatch is noted only when its straight line fits (R² ≥ 0.95).
  • New model "Pseudo-first (initial drop)": C(t) = A·C₀·e^(−kt), 0 ≤ A ≤ 1 — a fast initial step followed by first-order decay; A = 1 is plain PFO and is flagged as at-bound. Reports k, A, initial drop %, r₀ and t½.

Review fixes on top of the original commits

  • Golden master: the new A/A_se keys were compared at rtol = 1e-9 and A_se differs by 3.6e-9 between Windows and Linux; they join the fragile parameter keys. Existing golden values are unchanged (verified programmatically); only the new model's entries were added and no golden dataset's selected model changed.
  • Tab 2: the Zero-order intercept note fired on every decelerating run and repeated the PFO warning, so that check was dropped; the PSO note now requires R² ≥ 0.95.

Verification

  • On 5-point data with a fast initial step, the warnings fire exactly where expected (too-few-points everywhere; intercept warning only on the runs with an initial drop).
  • Synthetic two-stage data (8 points): the new model is selected in ≥ 45/50 seeds; on pure PFO data in ≤ 5/50.
  • Tests use only synthetic datasets (tests/synthetic_data.py); no experimental data in the tree or the branch history.
  • 188 tests pass; coverage 84 % (floor 81 %); ruff check / ruff format --check clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GN1ANT89MKDjHRXcnjgSjo


Generated by Claude Code

Hj1308 and others added 5 commits October 2, 2026 23:00
…otes

- The golden master compared the new model's A / A_se at rtol=1e-9; A_se
  differs by 3.6e-9 between the Windows build that wrote the JSON and
  Linux, so the test failed in CI. A, A_se and initial_drop_pct join the
  fragile parameter keys (statistics, flags and the selected model are
  still compared tightly).
- Tab 2: the Zero-order intercept note fired on every decelerating run
  (its line always misses C0) and repeated the Pseudo-first warning, so
  that check is dropped. The PSO note is shown only when the straight
  line fits (R² >= 0.95); linear_intercept_check now also returns r2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GN1ANT89MKDjHRXcnjgSjo
@Hj1308
Hj1308 merged commit 0129ba1 into main Oct 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants