question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

documentation of constraints in `isotonic_regression`

See original GitHub issue

The docstring of isotonic_regression says https://github.com/scikit-learn/scikit-learn/blob/91badfab662ad1eafda4b60d078f563f010265cc/sklearn/isotonic.py#L84

Notice the equalities with respect to min and max.

However, the function does not actually force the smallest estimate to be y_min and the largest to be y_max. I believe that is the correct behavior; the estimates should be constrained, not fixed.

The docstring should therefore read

        subject to y_min <= y_[1] <= y_[2] ... <= y_[n] <= y_max

If this is changed, https://github.com/scikit-learn/scikit-learn/blob/91badfab662ad1eafda4b60d078f563f010265cc/sklearn/isotonic.py#L147 should be changed as well.

What the function does is to apply np.clip, i.e. first unconstrained estimates are produced and then everything outside of [y_min, y_max] is forced to these values. https://github.com/scikit-learn/scikit-learn/blob/91badfab662ad1eafda4b60d078f563f010265cc/sklearn/isotonic.py#L135 I am not sure that is the correct approach for constrained quadratic optimization (but also don’t know positively it to be incorrect). Tagging @bnaul and @agramfort since they seem to have introduced this line.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
NicolasHugcommented, Jan 31, 2020

This one was actually fixed in minus 5 days 😉

1reaction
NicolasHugcommented, Jan 31, 2020

Taken care of in #16234 (your review is welcome there!)

Read more comments on GitHub >

github_iconTop Results From Across the Web

sklearn.isotonic.IsotonicRegression
Determines whether the predictions should be constrained to increase or decrease with X . 'auto' will decide based on the Spearman correlation estimate's...
Read more >
Stat 8054 Lecture Notes: Isotonic Regression
The components of λ are called Lagrange multipliers. From the eponym, this theorem is old. In the case where there are only equality...
Read more >
Isotonic Regression - CVXR
Introduction. Isotonic regression is regression with monotonic constraints. There are several packages in R to fit isotonic regression models.
Read more >
Isotonic Regression under Lipschitz Constraint - CORE
Abstract The pool adjacent violators (PAV) algorithm is an efficient technique for the class of isotonic regression problems with complete ...
Read more >
Isotonic Regression with Listwise and Pairwise Constraints
ABSTRACT. Ranking a set of retrieved documents according to their rel- evance to a given query has become a popular problem at.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found