cjekel / piecewise_linear_fit_py

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

How to calculate prediction intervals? #99

Open aaronnkang opened 2 years ago

aaronnkang commented 2 years ago

I can see how to generate confidence intervals using prediction_variance? Do you know of a way to generate prediction intervals?

Thanks

cjekel commented 2 years ago

Is this what you want? https://github.com/cjekel/piecewise_linear_fit_py/blob/master/examples/prediction_variance.py

That plot should give the prediction with +- error bars.

What do you want a confidence interval of?