scikit-learn: ENH: Ordinal logistic regression

Ordinal logistic regression (the proportional odds model) is a nice set of models that allow for the classification of ordered categories using the same machinery as binary logistic regression. As far as I know these models aren’t implemented outside the specialized mord package, and I think they could make a nice addition to the sklearn arsenal. The implementation is fairly straightforward, with estimation being done by maximum likelihood (gist below; there’s a minor constraint on the parameters which can be rewritten so that the problem becomes unconstrained), which can also take a penalized form, and so it should be possible to reuse a lot of existing code. Is there any way these could be included, and if so, what’s the best way to do so (creating new classes, or just extending existing ones)?

https://gist.github.com/dsaxton/92baf15b74c859e714a83f09029bf5b4

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 19 (6 by maintainers)

Most upvoted comments

@obarak We did not, but the package @hacktuarial mentions looks interesting

I would start by putting this in a scikit-learn-contrib package.