pwlf: Piecewise Linear Fitting

JSON →
library 2.5.2 ·python
verified May 24, 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 22
actors 8 distinct systems
last hit 17h ago ByteDance
ByteDance
4
MetaBot
4
GPTBot
2
Script
2
ClaudeBot
1
Search engines
1

top countries 🇺🇸 United States · 🇫🇷 France · 🇸🇬 Singapore · 🇨🇦 Canada · 🇩🇪 Germany