cjekel / piecewise_linear_fit_py

fit piecewise linear data for a specified number of line segments
MIT License
289 stars 59 forks source link

Fixed typos in calls to predict() from standard_errors() #46

Closed tcanders closed 4 years ago

tcanders commented 4 years ago

I kept getting the singular matrix exception from the call to linalg.inv() in standard_errors(). Initially, I got rid of the exception by using linalg.pinv(), but the resulting standard errors were obviously too big and nearly identical regardless of the data set. I eventually found that predict() was called with y_data instead of x_data. Also added a few comments that may help other understand the function.

cjekel commented 4 years ago

Sorry about the goose chase this sent you on. Thanks for fixing the bug. I'll merge this and push a new bugfix release to pypi shortly.

cjekel commented 4 years ago

@tcanders Thanks for fixing this! I just pushed version 1.1.2 to pypi.