As part of my final year Master's project, several linear and non-linear regression models were analysed using python programming language. Regression forms a part of supervised machine learning, which creates a function from a labelled training dataset to make a prediction. It is widely used in data analytics to discover patterns to gain actionable insights and is used to estimate the strength of the relationship between variables.
In this section of the project, the aim was to predict the future price of the Apple stock (AAPL) using data from the last 500 days traded. Linear Regression, Ridge Regression, Lasso, Random Forest, XGBoost and Support Vector Regression were used to predict the stock price of up to 50 days in the future. Given the unpredictable nature of the stock market, it was interesting to note how different models produced different results with plenty of actionable insights to be gathered. For this application, some improvements were highlighted with the addition of more data, including sentiment analysis, to make the models more robust and the results more reliable. However, as a first iteration, it has flaws (eg. given my application of the 'datetime' function to add data for ever model, the models do appear 50 days further in the future depending on their order of running the code). Additionally, the code is a first iteration and has a large portion of the code commented out, simply for addition in future iterations, including the Gaussian Process and the ARD Model. Also, the usage of dataframes can be optimised and over-use of resources will be fixed with the next iterations. Now, this code is free to use, however, I am not liable for any damages.
In a sphere dominated by the use of complex neural networks and deep learning techniques, the models analysed in this project detail a more simplified and resource-efficient approach for solving complex analytical problems with equally and sometimes more consistent results.
Several resources were utilised for this project. Harisson Kinsley's tutorials (www.pythonprogramming.net) were particularly helpful in grasping several concepts and formed the basis of this application, amongst others.