Better contrast specification
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 990
- Forks
- 106
- Avg merge
- 7d 34m
- Merged PRs (30d)
- 1
Description
Two possible improvements in how we work with contrasts:
- (minor) Maybe we should have a way to specify a contrast symbolically, like
linear_constraintbut just the linear part, not the= constantpart. - (major) There should be some way to specify contrasts and constraints in terms of predictions (which are invariant wrt coding), rather than predictors (betas). Like it should be possible to say "the difference between an item with a=1 and an item with a=2", and the model will spit out a matrix encoding this -- or, crucially, if the model has an interaction between a and b, then it will say "that's not estimable, you can't leave b unspecified". Possibly we also want to be able to say "tell me the derivative of the prediction wrt x1", since that's also one of the things that betas encode.
Syntax for this will be tricky. Possibly just an array of weights + a list of data dicts?
I need to brush up on the estimable contrast literature...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing linear_constraint entry point and the contrast-related API, then read the estimable contrast literature referenced in the issue. Before implementation, resolve whether the scope includes symbolic linear parts, prediction-based contrasts, interaction estimability checks, and prediction derivatives; done means an agreed syntax and behavior for the selected cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100