Skip to content

fix: WFPTNormalDrift normalisation when t0 > 0 - #8

Merged
cs-hall merged 3 commits into
mainfrom
fix_wfpt_normal_drift
Oct 9, 2026
Merged

cs-hall merged 3 commits into
mainfrom
fix_wfpt_normal_drift

Conversation

@cs-hall

@cs-hall cs-hall commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • WFPTNormalDrift.log_prob used v_loc**2 * RT where Navarro-Fuss / Blurton want decision time RT - t0, so the density integrated to less than 1 whenever t0 > 0 (e.g. 0.30 at v=2, sv=1, t0=0.8). Same bug WFPT had before b13135d.
  • Test grid helper get_choice_RTs starts at dt instead of 0, so the integration tests no longer pass RT = 0 (out of support) and stop raising out-of-support warnings.
  • Now computed in log space (no log(exp(...)) round trip), and -inf for RT <= t0 instead of NaN when sv² (RT - t0) + 1 < 0.

Tests

New (committed failing first, dc72d7c):

  • test_wfpt_normal_drift_integrate_to_one: integrates to 1 for t0 in {0, 0.5, 0.8}, v_scale up to 1.5, negative drift.
  • test_wfpt_normal_drift_matches_wfpt_as_v_scale_vanishes: reduces to WFPT as v_scale -> 0.

Before the fix: 4 failed (all t0 > 0 cases), 2 passed (t0 = 0).

Full suite after:

79 passed, 1 warning in 52.25s

The remaining warning is pytest declining to collect the TestDist namedtuple as a test class.

🤖 Generated with Claude Code

cs-hall and others added 3 commits October 8, 2026 22:07
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… before t0

The v_loc**2 term used RT instead of RT - t0, so the density integrated to
less than 1 whenever t0 > 0 (the same bug fixed in WFPT in b13135d). Also
computes in log space and returns -inf for RT <= t0 instead of NaN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cs-hall
cs-hall merged commit ee3e4d7 into main Oct 9, 2026
1 check passed
@cs-hall
cs-hall deleted the fix_wfpt_normal_drift branch October 9, 2026 02:16
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.

1 participant