In this video will show you how to write a Python program that predicts the price of stocks using two different Machine Learning Algorithms, one is called a Support Vector Regression (SVR) and the other is Linear Regression. So you can start trading and making money ! Actually this program is really simple and I doubt any major profit will be made from this program, but it’s slightly better than guessing!
NOTE: Some errors in the video:
(1) In the video to calculate the RMSE I put the following statement:
rmse=np.sqrt(np.mean((predictions- y_test)**2))
When in fact I meant to put:
rmse=np.sqrt(np.mean(((predictions- y_test)**2)))
You can also use the following statements to calculate RMSE:
1. rmse =np.sqrt(np.mean(((predictions- y_test)**2)))
2. rmse = np.sqrt(np.mean(np.power((np.array(y_test)-np.array(predictions)),2)))
3. rmse = np.sqrt(((predictions - y_test) ** 2).mean())
(2) The preprocessing of data using MinMaxScaler resulted in data leakage, leading to the creation of future bias. Despite this, the code can still be utilized to obtain a basic understanding of Neural Network implementation in Python for classification and prediction purposes.
Get the code here:
https://github.com/randerson112358/Python/blob/master/LSTM_Stock/LSTM2.ipynb
#python #machine-learning #data-science #developer #artificial-intelligence