df_slice = df[:-150] Predictions = [loaded_models[0].predict(np.asarray(df['Price'])[j-Obs:j].reshape(1, Obs, 1)) for j in range(Obs, len(df_slice))] Predictions = [df['Price'].iloc[0]]*Obs + [val[0][0] for val in Predictions]
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter