How do I avoid my machine learning model from producing a straight-line prediction and overfitting by using stock prices from the training data to predict stock prices on the test data? For instance, when assessing the model on Apple’s stock (AAPL), which has a price of $150, the model might predict a value close to the training stock, such as Microsoft (MSFT) which has a price of $249, rather than recognizing patterns that are unique to Apple’s stock.
Welcome to the Tensorflow Forum!
Please make sure your training data covers all the cases which are expected in the test case. Also for avoiding over-fitting use regularization.