3
$\begingroup$

I have a number of curves that contain numbers from between 0 and 1. The curves should be monotonically increasing, but due to random noise, there may be some times where it is decreasing.

Is there any smoothing method that is guaranteed to create a monotonically increasing curve? If there is a relevant Python package that would be helpful.

Two more points about the data that may be useful:

  1. Certain data points have weights, so if there is a useful way of incorporating those weights into the smoothing, that would be useful.
  2. We can be confident that the end points of the curve are accurate.
$\endgroup$
11
  • 1
    $\begingroup$ One option: en.wikipedia.org/wiki/Monotone_cubic_interpolation $\endgroup$
    – Sycorax
    Commented Sep 22, 2019 at 22:00
  • $\begingroup$ @Sycorax Doesn't this assume the data is already monotonic? $\endgroup$
    – user35734
    Commented Sep 22, 2019 at 22:38
  • 2
    $\begingroup$ There are certainly monotonic cubic spline fits -- and R packages that can fit them. I don't know about Python $\endgroup$
    – Glen_b
    Commented Sep 23, 2019 at 5:33
  • 1
    $\begingroup$ @whuber I have a list of data points, with x and y coordinates for each data point. When I use the term curve, I'm referring to this list of data points. A curve is monotonically decreasing if for all points in the curve, if x_i > x_j, then y_i < y_j. $\endgroup$
    – user35734
    Commented Sep 25, 2019 at 14:45
  • 1
    $\begingroup$ These details profoundly influence the statistical nature of your question and suggest solutions that nobody would propose based on what you have posted so far (such as logistic regression with a constrained slope): could you please edit your post to include them? $\endgroup$
    – whuber
    Commented Sep 25, 2019 at 17:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.