Introduction
BsplineQuantRegpy is a Python package for quantile regression with B-splines under shape constraints (monotonicity, convexity, third derivative).
Objectives
This package enables:
Fit quantile regression models with B-splines of degree 1 to 4.
Impose exact shape constraints over the entire interval or only a portion thereof. Constraints are enforced using the Karlin-Studden characterization for the sign of polynomials of degree 2 or 3, which lead to quadratically constrained problems: SOCP.
Using a high-performance GUI.
Main Features
SplineLinearQuant: Regression with linear splines (degree 1)
SplineQuadraticQuant: Regression with quadratic splines (degree 2)
SplineCubicQuant: Regression with cubic splines (degree 3)
SplineQuarticQuant: Regression with quartic splines (degree 4)
quantile_spline: Unified interface for all degrees
run_gui: Tkinter graphical interface
GUI Features
Generate data
Define knots
Select the regression quantile
Impose multiple constraints per region
Define the interval size
Use different spline degrees
Choose colors
Access module examples by selecting the degree of the regression splines.
Enables import/export of data and executable Python code
BIBLIOGRAPHICAL REFERENCES
Abbes, A. (2025). Quantile regression with cubic polynomial splines under shape constraints with applications. doi:10.5281/zenodo.17427913
He, X., & Shi, P. (1998). Monotone B-spline smoothing. Journal of the American Statistical Association, 93(442), 643-650.
Karlin, S., & Studden, W.J. (1966). Tchebycheff Systems: With Applications in Analysis and Statistics. Interscience Publishers.
Papp, D., & Alizadeh, F. (2014). Shape-Constrained Estimation Using Nonnegative Splines. Journal of Computational and Graphical Statistics, 23(1), 211-231.