Data Science, Machine Learning, Time Series Forecasting, Lstm, Deep Learning.
forecasts = model.predict(X_test) lstm_fits = model.predict(X_train) # Calculate metrics mape = mean_absolute_percentage_error(y_test, forecasts) r2 = r2_score(y_train, lstm_fits) # Initialize dates date_range = pd.date_range(start='1990-01-01', end='2023-09-30', freq='M') # Add empty values in