Repository navigation
Outcome: an offset for each response of a multi-response model - #7
Merged
Merged
Conversation
- A keyword given as a dict gives one column for each response, keyed
by the responses: the columns of a list of columns (a new response of
Outcome) or the classes of a Multinomial, whatever its output.
offset={'y1': 'O1', 'y2': 'O2'} gives offset[y1] and offset[y2], in
the order of the responses; a missing or unknown key raises, as does
a dict for a response with a single linear predictor.
- A single column is unchanged: the same offset for every response.
- Docs: a multinomial example in the Outcome section.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 27, 2026
Merged
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.
For 0.4.0: offsets of multi-response models, with as many columns as the full response.
Multinomial. For a multinomial the keys are its levels whether its output is labels or one-hot, so glmstar can take either form; for aMultinomialof counts, they are its count columns. Each value is a column or a single-column feature, as before.offset[...]columns follow the order of the responses, whatever the dict's order. A missing or unknown key raises, as does a dict for a response with a single linear predictor (a column,Surv,Binomial).Outcome: the responses of a multi-response model.offset='O') stays one column,offset, which glmstar broadcasts to every response.transform(X, response=False)gives the(n, k)offsets of new data.wildcard(exclude=outcome)leaves out every source column.For glmstar: a column
offsetis broadcast to every response, and columnsoffset[...]are one per response, in the response's order. If both are present, glmstar should raise an error.Tests: six new tests in
tests/test_outcome.py: dict order vs response order, a feature as a value, offsets of new data, multinomial labels and one-hot, counts, errors, polars. The full suite gives 282 passed and 5 strict xfails, and the docs page executes.🤖 Generated with Claude Code