corybrunson / corybrunson/ordered
proportional odds / parallel regression parameter
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 9
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
For the proportional odds / parallel regression assumption, i've only found user controls in 3 packages so far:
ordinalNet::ordinalNet(parallelTerms, nonparallelTerms, parallelPenaltyFactor): The first two are logical and cannot both be false; when both true, they yield partial "proportional odds" models with two sets of coefficients. The third must be nonnegative and penalizes non-parallel coefficients.ordinal::clm(nominal): The argument can be passed a formula that specifies a subset of predictors for which parallelism is relaxed (to be treated as nominal).VGAM::vg*m(family = <family>(eq.mean, parallel)): The first is logical and applies parallelism to all predictors; the second can also be passed a formula that specifies a subset of predictors.The term "proportional odds" only properly applies to logit-linked models, so "parallel regression" strikes me as a better source for the parameter name. While the formula syntax is common to two, my guess is that this was done to avoid the quotation mark hassle of passing names, which can be avoided in {parsnip} by tidy evaluation. So my suggestion is for a
parallel_regmodel parameter to accept both logical values (to apply to all predictors) and unquoted predictor names (with the option of using-to apply parallelism only to the remainder.I don't see the need for a dial because it seems rare for a modeler to want to consider only enforcing the assumption for all or none—though if i dial is wanted then this is what i assume it would be, since having it sample random subsets of predictors for enforcement seems misguided.
There are also several tools for testing the parallelism assumption:
repolr::po.test(), {contingencytables},gofcat::brant.test(), {brant}, {pomcheckr},VGAM::lrtest(),rms::ordParallel(). Should i open an issue at {performance} for checking proportionality?Finally, two packages (i've found so far) allow the user to specify how the arrangement of the category thresholds should be constrained:
ordinal::clm(threshold = c("flexible", "symmetric", "symmetric2", "equidistant"))brms::brm(family = <ordinal family>(threshold = c("flexible", "equidistant", "sum_to_zero")))I think this also warrants an engine parameter but not an associated dial.
Originally posted by @corybrunson in #4
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 parsnip bindings in this R repository and the proposed parallel_reg and threshold engine parameters described in the issue. Done means the maintainers have agreed on the parameter API, including whether a dial and proportionality checks are needed, and the bindings support the selected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100