Skip to content

Feat ordinalregression - #62

Open
MisterEkole wants to merge 3 commits into
StatMixedML:masterfrom
MisterEkole:feat-ordinalregression
Open

MisterEkole wants to merge 3 commits into
StatMixedML:masterfrom
MisterEkole:feat-ordinalregression

Conversation

@MisterEkole

Copy link
Copy Markdown

Summary

Implements the OrderedLogistic distribution for ordinal regression (closes #54).

Uses the cumulative link (proportional odds) model via Pyro's
OrderedLogisticdistribution. Cutpoint monotonicity is enforced through a cumulative
softplus reparameterisation, keeping all K tree outputs unconstrained while guaranteeing strict ordering at all times.

Changes

  • lightgbmlss/distributions/OrderedLogistic.py — new distribution class
  • lightgbmlss/distributions/__init__.py — register distribution
  • tests/test_distributions/test_ordinal.py — 17 unit tests
  • tests/utils.py — exclude from generic fixtures
  • docs/examples/OrderedLogistic_Regression.ipynb — end-to-end example
    notebook

Test plan

  • All 17 ordinal-specific tests pass (pytest tests/test_distributions/test_ordinal.py)
  • Existing test suite unaffected (pytest tests/test_distributions/)
  • Notebook runs end-to-end on simulated K=4 ordinal data