not having a function to get the y predictions
Hello, It's good to have such a useful package for segmented regression, but I don't see any function to get the predictions directly. Can you just create another function that returns the predictions, the code is already present in plot_fit function inside Fit class.
Hi. Thank you for the suggestion. It's a nice idea for a feature. It's not a priority but I will add it to potnetial features to implement in the next version.
That would be great. For me its the main reason to look for a piecewise regression package. I have two large datasets, and I want to use one dataset to correct the other. As the x-values are not identical, I need a fit-function.
Thank you for the library!
Indeed a function to predict new data points would be very convenient.
Something like
y_pred = pw_fit.predict(X)
I vote for Placid2000 suggestion and it is not a nice to have feature, basically ploting does the same but we don't always plot results especially on large data. I add a pull request to do so
Implemented! fit.predict(x) not does this. Thanks for the suggestion!