piecewise_linear_fit_py icon indicating copy to clipboard operation
piecewise_linear_fit_py copied to clipboard

Create a pwlf using custom coefficient

Open gretzteam opened this issue 3 years ago • 1 comments

It would be useful to have the ability to create a PWLF using my own coefficient. That way all the nice built-in analysis functions would be available. One use case is to use PWLF to create an initial set of polynomials. Then quantize them (for hardware implementation) and re-create the resulting PWLF for analysis.

gretzteam avatar Mar 01 '21 20:03 gretzteam

There is an undocumented hack you can do, where you can specify .beta and .fit_breaks after initialization.

If follows equation 4 in the paper: image but this is only for the linear case.

How are you specifying the polynomial coefficients? maybe we can write some interface to translate your coefficients into pwlf coefficients.

I've been wanting to create a pwlf.tools, and such interface could go there?

cjekel avatar Apr 17 '21 00:04 cjekel