International Journal of Computer Applications |
Foundation of Computer Science (FCS), NY, USA |
Volume 186 - Number 21 |
Year of Publication: 2024 |
Authors: Ahmad Farhan AlShammari |
10.5120/ijca2024923692 |
Ahmad Farhan AlShammari . Implementation of Multiple Regression using Least Squares and Gradient Descent in Python. International Journal of Computer Applications. 186, 21 ( May 2024), 4-9. DOI=10.5120/ijca2024923692
The goal of this research is to develop a multiple regression program using least squares and gradient descent in Python. Multiple regression helps to predict the output data based on the features of the input data using a linear polynomial. Least squares is used to minimize the error between the observed and predicted data. Gradient descent is used to find the optimal solution that provides the minimum value of error function. The basic steps of multiple regression using least squares and gradient descent are explained: preparing observed data, initializing weights and bias, computing predicted data, computing error function, computing partial derivatives, updating weights and bias, obtaining prediction equation, computing final prediction, and plotting predicted data. The developed program was tested on an experimental dataset. The program successfully performed the basic steps of multiple regression using least squares and gradient descent and provided the required results.