Predictions = [model.predict(np.asarray(df['Price'])[i:i+Obs].reshape(1, Obs, 1)) for i in range(len(df)-Obs)] 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