Added softmax likelihood for choice-only models#909
Merged
digicosmos86 merged 3 commits into906-update-config-for-choice-only-modelsfrom Mar 5, 2026
Merged
Conversation
Member
AlexanderFengler
left a comment
There was a problem hiding this comment.
Small comments, both concerned with consistency.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a softmax inverse temperature likelihood function for choice-only models, allowing the framework to model scenarios where only choices (not reaction times) are observed. The function computes log-likelihood for choice data using a softmax transformation with an inverse temperature parameter.
Changes:
- Added
softmax_inv_temperaturefunction to compute choice-only likelihood with variable number of logits - Updated type annotations from
typing.Typetotype(Python 3.9+ syntax) - Added basic shape validation tests for 2-choice and 3-choice scenarios
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| src/hssm/likelihoods/analytical.py | Added softmax_inv_temperature function and modernized type annotations from Type[T] to type[T] |
| tests/test_likelihoods_choice_only.py | Added parametrized shape validation tests for binary and ternary choice scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
AlexanderFengler
approved these changes
Mar 5, 2026
Member
AlexanderFengler
left a comment
There was a problem hiding this comment.
I think this one is good to go. Thanks @digicosmos86
378b02c
into
906-update-config-for-choice-only-models
4 checks passed
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.
Note: the test only tests that the output shape is correct (a 1-d array of length n where n is the length of data)