On this page:

Adaptive piecewise linear regression

"If there is a problem you can't solve, then there is an easier problem you can solve: find it."
- George Polya

A-PWLR-L1

The adaptive piecewise linear regression method (A-PWLR) uses the piecewise linear model and L1-risk function to solve regression problems. The regression problem is formulated as an unconstrained nonconvex nonsmooth optimization problem, where the objective function is presented as a difference of two convex (DC) functions. To address the nonconvexity of the problem A-PWLR builds piecewise linear estimates in an adaptive way using an incremental approach. The aggregate subgradient method for nonsmooth DC optimization (AggSub) is applied to solve the underlying optimization problems.

The software is free for academic teaching and research purposes but I ask you to refer the reference given below if you use it.

Code

Main.py - Main program for A-PWLR.
user_init.py - Initialization of parameters for A-PWLR and AggSub.
config.py - Global parameters and constants.
functions.py - Computation of DC components f_1 and f_2 and their subgradients for the PWLR-L1 problem.
aggsub-py - Aggregate subgradient method.

apwlr.zip - All the above in compressed form.

References

Acknowledgements

The work was financially supported by the Academy of Finland (Project No. 289500, 319274).