Skip to content

Add the ddm_normal_st model config (config part of #361, stacked on #349) - #369

Merged
AlexanderFengler merged 2 commits into
mainfrom
feat/ddm-normal-st-config
Oct 7, 2026
Merged

AlexanderFengler merged 2 commits into
mainfrom
feat/ddm-normal-st-config

Conversation

@AlexanderFengler

@AlexanderFengler AlexanderFengler commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Config part of #361 (890c8e9), split from #359 so that ddm_normal_st can go into the next release (lnccbrown/HSSM#1345 needs it) without waiting for #359.

Stacked on #349. Until #349 merges, the diff also shows its commits; afterwards it shrinks to the two commits below. Merge #349 first, with a merge commit.

What it adds

  • ddm_normal_st: ndt ~ Normal(t, st), so st is a standard deviation (ddm_st's st is a uniform half-width). Same parameters, order, bounds and simulator machinery as ddm_st; only the kernel differs.
  • Registration in _modelconfig/__init__.py and a KDE_NO_DISPLACE_T entry, so the generator forces displace_t off as for the other ndt-variability models.
  • tests/test_ddm_normal_st_config.py: the config tests from Feat/ddm normal st model config #361, plus one LogKDE test at the box corner (t=0.25, st=0.25, a=0.3, about 9% non-positive RTs) that fails without Filter non-positive RTs before KDE bandwidth estimation #349's filter.

Left out of 890c8e9, on purpose

  • The Normal branch of _recover_admissibility_boundary in kde_class.py and its three tests: the helper only exists after Displace RTs by the true admissibility boundary t - st, not by t #359 and belongs with it.
  • The ddm_uniform_st alias (config, registry entry, KDE_NO_DISPLACE_T entry, test): the naming of the uniform model is being settled together with HSSM, and an alias can be added later without breaking anything.

Why #349 underneath

  • The Normal kernel is unbounded and emits rt <= 0 by design. Without the filter, one such RT turns its whole KDE choice group into no_base_data with flat labels, on the default generator path.

Evidence

Relation to #361: this supersedes its config part; the boundary-helper part of #361 stays with #359.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added the ddm_normal_st model option, which samples non-decision time from a Normal distribution and is available alongside the existing model configurations.
    • The model’s Normal distribution is untruncated, so simulated reaction times can be zero or negative, particularly with larger values of st.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3327484f-a8bc-45a3-9ab2-5f43834997ca
📥 Commits

Reviewing files that changed from the base of the PR and between 7e4bcd2 and 9092013.

📒 Files selected for processing (4)
  • ssms/config/_modelconfig/__init__.py
  • ssms/config/_modelconfig/ddm_random.py
  • ssms/config/kde_constants.py
  • tests/test_ddm_normal_st_config.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The pull request adds and exports the ddm_normal_st model configuration. It uses an untruncated Normal distribution for non-decision time and adds KDE handling and tests for reaction times at or below zero.

Changes

ddm_normal_st model

Layer / File(s) Summary
Define and register the model
ssms/config/_modelconfig/ddm_random.py, ssms/config/_modelconfig/__init__.py
Adds a five-parameter configuration with bounds and defaults matching ddm_st. The configuration maps st to the standard deviation of an untruncated Normal distribution and is added to the model mapping and exports.
KDE support and validation
ssms/config/kde_constants.py, tests/test_ddm_normal_st_config.py
Adds ddm_normal_st to KDE_NO_DISPLACE_T. Tests compare its parameter distributions and simulation output with ddm_st, measure non-positive reaction-time rates, and check generator and LogKDE behavior.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to 90920

This change adds a new ddm_normal_st model configuration with tests. No actionable merge-blocking risk was found.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding the ddm_normal_st model configuration. The parenthetical gives relevant pull request context.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 4 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unittests 94.43% <100.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
ssms/config/_modelconfig/ddm_random.py 100.00% <100.00%> (ø)
ssms/config/kde_constants.py 100.00% <ø> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

eitan_perlin@brown.edu and others added 2 commits October 7, 2026 15:17
This is the config part of #361 (890c8e9), split off so that the model
can be released without #359, which that branch is stacked on and which
is not ready.

ddm_normal_st draws ndt ~ Normal(t, st), so st is a standard deviation,
against the uniform half-width that ddm_st means by the same parameter.
Parameters, order, bounds and simulator machinery are ddm_st's; only the
kernel differs. The model joins KDE_NO_DISPLACE_T like the other
ndt-variability models.

The kernel is unbounded, so it emits rt <= 0 by design (about 9% of
samples at the box corner t=0.25, st=0.25, a=0.3). KDE label generation
therefore needs the non-positive-RT filter of #349, which this commit
sits on.

Left out of 890c8e9:
- The Normal branch of _recover_admissibility_boundary in kde_class.py
  and its three tests. The helper only exists after #359, so they belong
  with that PR.
- The ddm_uniform_st alias of ddm_st (config function, registry entry,
  KDE_NO_DISPLACE_T entry and test). The name of the uniform model is
  being settled separately, and an alias can be added later without
  breaking anything.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
At t=0.25, st=0.25, a=0.3 about 9% of ddm_normal_st's RTs are
non-positive. Without the non-positive-RT filter of #349, one such RT
turns its whole choice group into "no_base_data" and its labels into a
constant, on the displace_t=False path the generator takes for this
model. The test fails when kde_class.py is restored to main's version,
so it pins the model's dependency on that filter.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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