Data Science, Machine Learning, Artificial Intelligence, Technology, Fintech.
predicted_prices.append(scaler.inverse_transform(next_prediction)[0, 0]) # Creating a list of dates for the predictions last_date = data.index[-1] next_day = last_date + pd.Timedelta(days=1) prediction_dates = pd.date_range(start=next_day, periods=4) # Adding predictions to the DataFrame