Repository navigation
Make the wider-range network the angle model - #1530
Merged
Merged
Conversation
A parameter named shape (gamma_drift, gamma_drift_angle) was read as PyMC's shape keyword, so the response was built as a single trial. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t shape -> k (#1456) make_distribution now refuses a parameter named after a pm.Distribution keyword (shape, size, name, observed, dims, ...) with an error that asks for a rename. gamma_drift and gamma_drift_angle call their gamma shape parameter k, matching ssm-simulators. With the check in place, passing parameters to PyMC by position no longer guards anything, so that change is reverted. HSSM(...) now names the model's parameters when a keyword is neither a parameter nor a bambi.Model argument. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A parameter fixed to a vector reaches Bambi, and so the RV, as a scalar 0.0 placeholder; only HSSMDistribution.logp() put the vector back. sample_posterior_predictive, sample_prior_predictive and sample_do therefore simulated every row with 0.0 for that parameter. - make_hssm_rv takes the fixed vectors, and rng_fn simulates with them, broadcast against the other parameters, one value per row. - sample_posterior_predictive(data=...) with kind="response" raises a ValueError for such models unless data is the model's own data, since the vector has no values for other rows. - Add tests and changelog item 24. Claude helped me with this change.
…#1453) rng_fn takes p_outlier out of the parameters before broadcasting them, so a p_outlier fixed to a vector kept its (n_obs,) shape and _apply_lapse_model could not reshape it to the draws. Broadcast it to the same shape, and test that each row gets its own lapse probability. Claude helped me with this change.
- predict() applies the same new-data check as sample_posterior_predictive. - The check compares the values of the columns data shares with model.data, so the index, dtypes and extra columns no longer make the model's own rows look new. The error says that reordered rows also fail. - A broadcasting error is blamed on the fixed vector only when the other parameters broadcast with each other. - make_distribution logs a warning when rv is a RandomVariable, whose rng_fn cannot receive the fixed vectors. - RLSSM and aDDM raise NotImplementedError for a parameter fixed to a vector: they used 0.0 in its place, in the likelihood too. - Correct the changelog entry.
…ard (#1453) - Bambi 0.19 and 0.20 accept kind="pps", a deprecated alias of "response", so the new-data check covers it too. - _has_same_rows compares the missing-value masks, then the other values, so NaN in an object column no longer makes the model's own rows look different.
Conflicts: - docs/changelog.md: main's items 19-34 kept; this PR's entry moves from 19 to 35 and its migration note becomes breaking change 3. The entry no longer names ssm-simulators 0.16.0 as the release with the rename (0.16.0 shipped without it); it says "its first release after 0.16.0". - tests/distribution_utils/test_distribution_utils.py: both sides' new tests kept; the reserved-name test follows main's. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- Keep the isinstance checks in make_distribution's branches so that mypy narrows `rv`. - Raise NotImplementedError for a parameter fixed to a vector when `loglik` is a pm.Distribution class, which receives the 0.0 placeholder. - Compare only the columns the model reads (response, formula variables, extra fields) when checking `data` for fixed vectors, name the first column that differs, and raise when `data` shares none of them.
Conflicts: the base.py imports (keep both: this branch uses formulae.model_description, main bambi.utils.get_aliased_name) and the changelog entry number, now after the entries main added.
Conflicts with #1266: make_hssm_rv and make_distribution keep both fixed_vector_params and expected_obs_dim, in main's merged str-or-callable branch; RLSSM keeps _validate_fixed_vectors, and _validate_choice_only_responses stays removed as in main.
…-params Chains the open 0.5.1 pull requests so that they merge back to back: this branch now contains #1502 and the pull requests before it (#1448, #1450, #1455, #1454), and its changelog entry is item 43. The entry loses the sentence on reordered rows, which #1455 makes obsolete. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The first release in which gamma_drift and gamma_drift_angle call their gamma shape k (lnccbrown/ssm-simulators#449). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
angle loads angle_extended.onnx and declares v in (-6, 6), the box ssm-simulators 0.17.0 gives it. angle_extended becomes a deprecated name: it builds angle, warns, and leaves hssm.list_models(). The legacy RLDM likelihood and two tutorial examples follow the config. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Notebooks changed:
Review visual diffs and comment on any notebook cell. All comments sync back to this PR. Powered by ReviewNB |
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 48 minutes. View limit details
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. |
AlexanderFengler
added a commit
that referenced
this pull request
Nov 27, 2026
…to feat/register-full-ddm-lan One conflict, in tests/test_modelconfig.py: the registry test's model list takes `angle` from #1530 (`angle_extended` is now a deprecated name) and keeps `full_ddm_lan` from this branch. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
AlexanderFengler
marked this pull request as ready for review
November 27, 2026 17:42
AlexanderFengler
changed the base branch from
1456-shape-param-collision
to
main
November 27, 2026 18:11
The branch had merged a newer main than the five PRs chained before it, so after those were merged GitHub saw two merge bases and reported a conflict. With main merged in, the merge base is main's tip. No content conflict; the tree is the one the chain was tested with. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Keeps the 0.5.1 chain mergeable on GitHub: each branch contains main and the branch before it, so there is one merge base at every step. No content change beyond what main and #1503 already contain. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Keeps the 0.5.1 chain mergeable on GitHub: each branch contains main and the branch before it, so there is one merge base at every step. No content change beyond what main and #1457 already contain. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
AlexanderFengler
added a commit
to EItanm1999/HSSM
that referenced
this pull request
Nov 27, 2026
Keeps the 0.5.1 chain mergeable on GitHub: each branch contains main and the branch before it, so there is one merge base at every step. No content change beyond what main and lnccbrown#1530 already contain. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
AlexanderFengler
added a commit
that referenced
this pull request
Nov 28, 2026
…m_defaults (#1529) HSSM(...) and get_default_model_config map `angle_extended` to `angle` with a FutureWarning, but a direct Config.from_defaults("angle_extended", None) raised the custom-model error, and with a loglik_kind it kept the old name. The classmethod now resolves the name first. Raised by CodeRabbit on #1518, #1439 and #1532; the alias itself came in with #1530. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spine plan: https://github.com/lnccbrown/HSSMSpine/blob/main/plans/angle-wider-range-primary.md#pr-stack (step H1)
Depends on: lnccbrown/ssm-simulators#455 (M1, merged), the ssm-simulators 0.17.0 release (R), and #1457, which this branch is stacked on
Unblocks: P1 (the paper notebooks)
angleloadsangle_extended.onnxand declaresvin (-6, 6). No file on the Hub changes.angle_extendedleaveshssm.list_models().HSSM(model="angle_extended")and an RLSSMdecision_process="angle_extended"buildangleand raise aFutureWarning. One mapping,DEPRECATED_MODEL_NAMESinhssm.modelconfig; no code branches on the name.hssm.likelihoods.rldm_optimized, two hand-built PyMC examples in the scenic-route tutorial (code only; outputs not regenerated), and the models table.vprior named in item 32.v, the maintainer's choice (D3 of the plan): this PR takes the generic rule,Uniform(-6, 6), orNormal(0, 3)for a regression intercept. HoldingNormal(0, 1.5)needs Discussion: should default priors be declared in the model configs? #1486 first.mainsince 2026-11-27, so until Reject PyMC keyword parameter names; rename gamma_drift's shape to k #1457 is merged “Files changed” also shows Reject PyMC keyword parameter names; rename gamma_drift's shape to k #1457 and the PRs before it; the change itself is +93/−72 in 15 files. Reject PyMC keyword parameter names; rename gamma_drift's shape to k #1457 carries the floorssm-simulators>=0.17.0and is chained behind fix(dist): simulate fixed-vector parameters with their values #1503 for the changelog numbers. Merge order, with merge commits: fix(utils): index log-likelihood draws by position, not coordinate value #1448 → fix(utils): find missing-RT rows by the rt column in _rearrange_data #1450 → fix(hssm): reorder fixed-vector parameters with the rows _rearrange_data moves #1455 → fix(rldm): give the angle LAN -1/1 choices for 0/1 responses #1454 → fix(utils): refuse Bambi's multi-column responses in log_likelihood #1502 → fix(dist): simulate fixed-vector parameters with their values #1503 → Reject PyMC keyword parameter names; rename gamma_drift's shape to k #1457 → this.main, the tree 0.17.0 is cut from:angle, and the three rename tests of Reject PyMC keyword parameter names; rename gamma_drift's shape to k #1457;HSSM(model="angle")recordsangle_extended.onnx; the line in the changelog builds onangle.onnxwithvin (-3, 3); the presets2AB_RW_Angleand2AB_RW_DualAlpha_Anglebuild on the new network.Closes #1529
🤖 Generated with Claude Code