Pub. online:20 Jan 2025Type:Computing In Data ScienceOpen Access
Journal:Journal of Data Science
Volume 23, Issue 4 (2025): Special Issue: In honor of Prof. Xizhi Wu for his transformative contributions to statistics and data science in China, pp. 648–658
Abstract
Piecewise linear-quadratic (PLQ) functions are a fundamental function class in convex optimization, especially within the Empirical Risk Minimization (ERM) framework, which employs various PLQ loss functions. This paper provides a workflow for decomposing a general convex PLQ loss into its ReLU-ReHU representation, along with a Python implementation designed to enhance the efficiency of presenting and solving ERM problems, particularly when integrated with ReHLine (a powerful solver for PLQ ERMs). Our proposed package, plqcom, accepts three representations of PLQ functions and offers user-friendly APIs for verifying their convexity and continuity. The Python package is available at https://github.com/keepwith/PLQComposite.