Write a stock market prediction code with deep neural network

Build a model based on historical data and use a deep neural network (DNN) to train the model to predict stock market trends: import numpy as np import tensorflow as tf# Prepare data X = np.array([[1, 2, 3], [4, 5, 6]]) y = np.array([7, 8])# Create model model = tf.keras.models.Sequential() model.add(tf.keras.layers.Dense(1, input_shape=(3 ,)))# Compile and train the model model.compile(optimizer='adam', loss='mse') model

Guess you like

Origin blog.csdn.net/weixin_42594427/article/details/129502592