Preparing for system design interviews?  Try bugzed.com →

pwlf: Piecewise Linear Fitting

JSON →
library 2.5.2 ·python
verified Jun 28, 2026

pwlf is a Python library (v2.5.2) for fitting continuous piecewise linear functions to 1D data. It allows users to specify the number of line segments and uses global optimization (like differential evolution or L-BFGS-B) to find optimal breakpoint locations. The library also supports fitting with known breakpoints, constrained fits, and provides statistical properties like standard errors and R-squared values. It is actively maintained with regular releases.

total hits 12
actors 4 distinct systems
last hit 20d ago AhrefsBot
GPTBot
4
Amazonbot
3
Script
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany