Skip to main content
Log in

A binary search algorithm for univariate data approximation and estimation of extrema by piecewise monotonic constraints

  • Published:
Journal of Global Optimization Aims and scope Submit manuscript

Abstract

The piecewise monotonic approximation problem makes the least changes to n univariate noisy data so that the piecewise linear interpolant to the new values is composed of at most k monotonic sections. The term “least changes” is defined in the sense of a global sum of strictly convex functions of changes. The main difficulty in this calculation is that the extrema of the interpolant have to be found automatically, but the number of all possible combinations of extrema can be \({\mathcal {O}}(n^{k-1})\), which makes not practicable to test each one separately. It is known that the case \(k=1\) is straightforward, and that the case \(k>1\) reduces to partitioning the data into at most k disjoint sets of adjacent data and solving a \(k=1\) problem for each set. Some ordering relations of the extrema are studied that establish three quite efficient algorithms by using a binary search method for partitioning the data. In the least squares case the total work is only \({\mathcal {O}}(n \sigma +k\sigma \log _2\sigma )\) computer operations when \(k \ge 3\) and is only \({\mathcal {O}}(n)\) when \(k=1\) or 2, where \(\sigma -2\) is the number of sign changes in the sequence of the first differences of the data. Fortran software has been written for this case and the numerical results indicate superior performance to existing algorithms. Some examples with real data illustrate the method. Many applications of the method arise from bioinformatics, energy, geophysics, medical imaging, and peak finding in spectroscopy, for instance.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

Data Availability Statement

The sources of the datasets analysed during the current study are given in the references.

References

  1. Annual unemployment, U.S. 1890 to 1970. Available online: https://datamarket.com/ data/, it is tagged unemployment, labour-market (accessed on 17 October 2015)

  2. Barlow, R.E., Bartholomew, D.J., Bremner, J.M., Brunk, H.D.: Statistical Inference under Order Restrictions. J. Wiley and Sons, Chichester, U.K (1980)

    MATH  Google Scholar 

  3. Bruner, A.P., Scott, K., Wilson, D., Underhill, B., Lyles, T., Stopka, C., Ballinger, R., Geiser, E.A.: “Automatic peak finding of dynamic batch sets of low snr in-vivo phosphorus nmr spectra”, unpublished manuscript, Departments of Radiology, Physics, Nuclear and Radiological Sciences, Surgery, Mathematics, Medicine, and Exercise and Sport Sciences, University of Florida, and the Veterans Affairs Medical Center, Gainesville, Florida, U.S. Available online: cds.ismrm.org/ismrm-1998/.../P1857.pdf (accessed on 21 March 2015)

  4. Davies, L., Höhenrieder, C., Krämer, W.: Recursive computation of piecewise constant volatililies. Comput. Stat. 11, 3623–3631 (2012)

    MATH  Google Scholar 

  5. Dehling, H., Fried, R., Wornowizki, M.: An asymptotic test on the stationarity of the variance, SFB 823, Discussion paper Nr. 71/2016, 24 pp. (2016)

  6. Demetriou, I.C.: A characterization theorem for the discrete best monotonic approximation problem. Math. Comput. 55, 191–195 (1990)

    Article  MathSciNet  Google Scholar 

  7. Demetriou, I.C.: Discrete piecewise monotonic approximation by a strictly convex distance function. Math. Comput. 64, 157–180 (1995)

    Article  MathSciNet  Google Scholar 

  8. Demetriou, I.C.: Signs of divided differences yield least squares data fitting with constrained monotonicity or convexity. J. Comput. Appl. Math. 146, 179–211 (2002)

    Article  MathSciNet  Google Scholar 

  9. Demetriou, I.C.: Algorithm 863: L2WPMA, a Fortran 77 package for weighted least-squares piecewise monotonic data approximation. ACM Trans. Math. Softw. 33(1), 1–19 (2007)

    Article  Google Scholar 

  10. Demetriou, I.C.: Peak estimation of a spectrum from noisy measurements by least squares piecewise monotonic data approximation. In Lecture Notes in Engineering and Computer Science: proceedings of the international multiconference of engineers and computer scientists 2018 (Editors: S.I. Ao, O. Castillo, C. Douglas, D.D. Feng, A.M. Korsunsky), 14–16 March, 2018, Hong Kong, pp. 51–56 (2018)

  11. Demetriou, I.C.: A decomposition theorem for the least squares piecewise monotonic data approximation problem. In Approximation and Optimization: Algorithms, Complexity and Applications (Editors: I.C. Demetriou, P.M. Pardalos), Springer Optimization and its Applications 145, Springer Nature Switzerland AG (2019), pp. 119–134, https://doi.org/10.1007/978-3-030-12767-1

  12. Demetriou, I.C.: Separation theorems for the extrema of best piecewise monotonic approximations to successive data. Optim. Methods Softw. 35(3), 439–459 (2020). https://doi.org/10.1080/10556788.2019.1613653

    Article  MathSciNet  MATH  Google Scholar 

  13. Demetriou, I.C., Powell, M.J.D.: Least squares smoothing of univariate data to achieve piecewise monotonicity. IMA J. Num. Anal. 11, 411–432 (1991)

    Article  MathSciNet  Google Scholar 

  14. Dierckx, P.: Curve and Surface Fitting with Splines. Clarendon Press, Oxford, U.K. (1995)

    MATH  Google Scholar 

  15. Dyson, N.: Chromatographic Integration Methods, 2nd edn. The Royal Society of Chemistry, Cambridge, U.K. (1998)

    Google Scholar 

  16. van Eeden, C.: Maximum likelihood estimation of ordered probabilities. Indag. Math. 18, 444–455 (1956)

    Article  MathSciNet  Google Scholar 

  17. Fletcher, R.: Practical Methods of Optimization. J. Wiley and Sons, Chichester, U.K. (2003)

    MATH  Google Scholar 

  18. Goldengorin, B.: Requirements of Standards: Optimization Models and Algorithms. Russian Operations Co., Hoogenzand, The Netherlands (1995)

    Google Scholar 

  19. Gonzalez, R.C., Woods, R.E.: Digital Image Processing, 3rd edn. Pearson Prentice Hall, Upper Saddle River, New Jersey (2008)

    Google Scholar 

  20. Gunther, H., Spectroscopy, N.M.R.: Basic Principles, Concepts and Applications in Chemistry, 3rd edn. J. Wiley and Sons, Chichester, U.K. (2013)

    Google Scholar 

  21. Hamilton, J.: Time Series Analysis. Princeton University Press, Princeton, New Jersey (1994)

    Book  Google Scholar 

  22. Ishrat, T., Ledwich, G., Vilathgamuwa, M., Borghesani, P.: Identification scheme of maximum traction force using recursive least square for traction control in electric locomotives, in proceedings of the 12th IEEE international conference on power electronics and drive systems (PEDS 2017), 6 pp., 12–15 December 2017 Honolulu, Hawaii, USA (2017)

  23. Karabutov, N.: Structural identification of static systems with distributed lags. Int. J. Contr. Sci. Eng. 2(6), 136–142 (2012)

    Article  Google Scholar 

  24. Laboratory of Photoinduced Effects Vibrational and X-ray spectroscopies, department of physics, University of Parma. Available online: http://www.fis.unipr.it/phevix/ramandb.php, andradite2.txt, augite1.txt (accessed on 20 February 2017)

  25. Lazaropoulos, A.G.: Measurement differences, faults and instabilities in intelligent energy systems - Part 1: identification of overhead high-voltage broadband over power lines network topologies by applying topology identification methodology (TIM). Trends Renew. Energy 2, 85–112 (2016)

    Article  Google Scholar 

  26. Lazaropoulos, A.G.: Measurement differences, faults and instabilities in intelligent energy systems - Part 2: fault and instability prediction in overhead high-voltage broadband over power lines networks by applying fault and instability identification methodology (FIIM). Trends in Renew. Energy 2, 113–142 (2016)

    Article  Google Scholar 

  27. Lazaropoulos, A.G.: Smart Energy and Spectral Efficiency (SE) of distribution Broadband over Power Lines (BPL) Networks - Part 2: L1PMA, L2WPMA and L2CXCV for SE against Measurement Differences in Overhead Medium-Voltage BPL Networks. Trends in Renew. Energy 4, 185–212 (2018)

    Google Scholar 

  28. Lazaropoulos, A.G.: Business analytics and IT in smart grid - Part 3: new application aspect and the quantitative mitigation analysis of piecewise monotonic data approximations on the iSHM class map footprints of overhead low-voltage broadband over power lines topologies contaminated by measurement differences. Trends in Renew. Energy 6, 214–233 (2020)

    Google Scholar 

  29. Lu, J.: Signal restoration with controlled piecewise monotonicity constraint. In Proceedings of the IEEE International conference on acoustics, Speech and Signal Processing, 12-15 May 1998, Seattle WA, Vol. 3, pp. 1621–1624 (1998)

  30. McCreery, R.L.: Raman Spectroscopy for Chemical Analysis. J. Wiley and Sons, Chichester, U.K. (2000)

    Book  Google Scholar 

  31. Nelson, C.R., Plosser, C.I.: Trends and random walks in macroeconomic time series. J. Monetary Econ. 10, 139–162 (1982)

    Article  Google Scholar 

  32. Robertson, T., Wright, F.T., Dykstra, R.L.: Order Restricted Statistical Inference. J. Wiley and Sons, Chichester, U.K. (1988)

    MATH  Google Scholar 

  33. Royset, J.O., Wets, R.J.-B.: On univariate function identification problems. Math. Program. 168, 449–474 (2018)

    Article  MathSciNet  Google Scholar 

  34. Runge, V.M., Nitz, W.R., Schmeets, S.H.: The Physics of Clinical MR Taught Through Images, 2nd edn. Thieme, New York (2009)

    Google Scholar 

  35. Sauerland, V., Löptien, U., Leonhard, C., Oschlies, A., Srivastav, A.: Error assessment of biogeochemichal models by lower bound methods (NOMMA-1.0). Geosci. Model Dev. 11, 1181–1198 (2018)

    Article  Google Scholar 

  36. Schumpeter, J.A.: Business Cycles. McGraw-Hill, New York (1939)

    Google Scholar 

  37. Solanki, S.K.: Sunspots: an overview. Astron. Astrophys. Rev. 11, 153–286 (2003)

    Article  Google Scholar 

  38. Solar Influences Data Analysis Center of the Royal Observatory of Belgium. Available online: http://sidc.oma.be/data, monthssn.dat (accessed on 6 June 2015)

  39. Tikhonov, A.N., Arsenin, V.Y.: Solution of Ill-Posed Problems. Winston and Sons, Washington (1977)

    MATH  Google Scholar 

  40. Vassiliou, E., Demetriou, I.C.: An adaptive algorithm for least squares piecewise monotonic data fitting. Comput. Stat. Data Anal. 49, 591–609 (2005)

    Article  MathSciNet  Google Scholar 

  41. Weaver, J.B.: Applications of monotonic noise reduction algorithms in fMRI, phase estimation, and contrast enhancement. Int. J. Imag. Syst. Technol. 10, 177–185 (1999)

    Article  Google Scholar 

  42. Whittaker, E., Robinson, G.: The Calculus of Observations. A Treatise on Numerical Mathematics, 4th edn. Blackie and Son Limited, London, U.K. (1944)

    MATH  Google Scholar 

  43. von Winterfeldt, D., Edwards, W.: Decision Analysis and Behavioral Research. Cambridge University Press, Cambridge, U.K. (1986)

    Google Scholar 

  44. Sun, W., Yuan, Y.: Optimization Theory and Methods. Nonlinear Programming, Springer Optimization and its Applications 1. Springer, U.S. (2006)

    Google Scholar 

Download references

Acknowledgements

The author is very grateful to a reviewer for useful suggestions on the presentation of the introduction and the conclusions of this paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ioannis C. Demetriou.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Demetriou, I.C. A binary search algorithm for univariate data approximation and estimation of extrema by piecewise monotonic constraints. J Glob Optim 82, 691–726 (2022). https://doi.org/10.1007/s10898-021-01042-x

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10898-021-01042-x

Keywords

Mathematics Subject Classification

Navigation