the function is available in the script lstm_utils py the following snippet uses the predict_reg_ multiple(function to get predictions on the test set in [ test_pred_seqs predict_reg_multiple(lstm_modelx_testwindow_size=windowprediction_len=pred_lengthto analyze the performancewe will calculate the rmse for the fitted sequence we use sklearn' metrics module for the same the following snippet calculates the rmse score in [ test_rmse math sqrt(mean_squared_error(y_test[ :]np array(test_pred_seqsflatten())print('test score rmse(test_rmse)test score rmse the output is an rmse of as an exerciseyou may compare rmse with different window sizes and prediction lengths and observe the overall model performance to visualize our predictionswe plot the predictions against the normalized testing data we use the function plot_reg_results()which is also available for reference in lstm_utils py the following snippet generates the required plot using the same function in [ ]plot_reg_results(test_pred_seqs,y_test,prediction_len=pred_lengthfigure - forecast plot with lstmwindow size and prediction length in figure - the gray line is the original/true test data (normalizedand the black lines denote the predicted/forecast values in three-day periods the dotted line is used to explain the overall flow of the predicted series as is evidentthe forecasts are off the mark to some extent from the actual data trends yet they seem to have some similarity to the actual data before we conclude this sectionthere are few important points to be kept in mind lstms are vastly powerful units with memory to store and use past information in our current scenariowe utilized windowed approach with stacked lstm architecture (two lstm layers in our modelthis is also termed as many-to-one architecture where multiple input values are used to generate single output another important point here is that the window size along with other hyperparameters of the network (like epochsbatch sizelstm unitsetc have an impact on the final results (this is left as an exercise for you to explorethuswe should be careful before deploying such models in production