This is a set of MATLAB functions for performing polynomial regression with shape constraints. The currently supported shape constraints are monotonicity and convexity on a bounded interval.
This project was developed in MATLAB R2019a. We do not guarantee the forward or backward compatibility to any other versions.
Install YALMIP toolbox by following the instructions here.
Install MOSEK solver by following the instructions here.
After adding MOSEK to the MATLAB path, check the installation by running yalmiptest. You should see something like that as part of the output:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| Test| Solution| Solver message|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| Core functionalities| N/A| Successfully solved (YALMIP)|
| LP| Correct| Successfully solved (MOSEK)|
| LP| Correct| Successfully solved (MOSEK)|
| QP| Correct| Successfully solved (MOSEK)|
| QP| Correct| Successfully solved (MOSEK)|
As a note, make sure to download the MOSEK license file and place it in the \mosek\
folder.
As a note! You might experience issues in the installation process, I found the YALMIP forum to be very prompt and helpful at answering questions.
The file monotone_regression.m implements the main function for polynomial regression with monotonicity constraints.
The file bounded_derivative_regression.m implements the main function for polynomial regression with bounded-derivative constraints. Bounded Derivative Regression generalizes Monotone Regression, which has only one-sided bounds. It also generalizes Lipchitz Regression where the bounds on the derivative are symmetric in the positive and negative directions.
The file convex_regression.m implements the main function for polynomial regression with joint convexity constraints.
The file monotone_convex_regression.m implements the main function for polynomial regression with joint convexity constraints as well as monotonicity constraints.