Data Science, Machine Learning, Artificial Intelligence, Technology, Stock Market.
sklearn.preprocessing import MinMaxScaler # Download Apple Inc. stock data aapl_data = yf.download('AAPL', start='2020-01-01', end='2024-03-01') # Use the 'Close' price for prediction close_prices = aapl_data['Close'].values # Normalize the data scaler = MinMaxScaler(feature_range=(0, 1))