lppls icon indicating copy to clipboard operation
lppls copied to clipboard

add future days forecast for the fitted lines

Open GXY2017 opened this issue 1 year ago • 1 comments

I tried to extend the fitted line into future days. It would be useful to update the lppls_model.plot_fit() function.

#  extend
new_dates = pd.date_range(start=data.index[-1] + pd.Timedelta(days=1), periods=500)
t = [pd.Timestamp.toordinal(timestamp) for timestamp in new_dates]
y = a + np.power(tc - t, m) * (b + ((c1 * np.cos(w * np.log(tc - t))) + (c2 * np.sin(w * np.log(tc - t)))))

plt.plot(new_dates, y)
plt.show()

image

GXY2017 avatar Oct 10 '23 01:10 GXY2017