Data Science, Machine Learning, Artificial Intelligence, Technology, Fintech.
Scaling the data scaler = MinMaxScaler(feature_range=(0,1)) scaled_data = scaler.fit_transform(closing_prices.reshape(-1,1)) # Since we need the last 60 days to predict the next day, we reshape the data accordingly X_latest = np.array([scaled_data[-60:].reshape(60)]) # Reshaping the data for the