CFP last date
20 January 2025
Reseach Article

Implementation of Multiple Regression using Least Squares and Gradient Descent in Python

by Ahmad Farhan AlShammari
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

@article{ 10.5120/ijca2024923692,
author = { Ahmad Farhan AlShammari },
title = { Implementation of Multiple Regression using Least Squares and Gradient Descent in Python },
journal = { International Journal of Computer Applications },
issue_date = { May 2024 },
volume = { 186 },
number = { 21 },
month = { May },
year = { 2024 },
issn = { 0975-8887 },
pages = { 4-9 },
numpages = {9},
url = { https://ijcaonline.org/archives/volume186/number21/implementation-of-multiple-regression-using-least-squares-and-gradient-descent-in-python/ },
doi = { 10.5120/ijca2024923692 },
publisher = {Foundation of Computer Science (FCS), NY, USA},
address = {New York, USA}
}
%0 Journal Article
%1 2024-05-24T23:33:49+05:30
%A Ahmad Farhan AlShammari
%T Implementation of Multiple Regression using Least Squares and Gradient Descent in Python
%J International Journal of Computer Applications
%@ 0975-8887
%V 186
%N 21
%P 4-9
%D 2024
%I Foundation of Computer Science (FCS), NY, USA
Abstract

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.

References
  1. Sammut, C., & Webb, G. I. (2011). "Encyclopedia of Machine Learning". Springer Science & Business Media.
  2. Jung, A. (2022). "Machine Learning: The Basics". Singapore: Springer.
  3. Kubat, M. (2021). "An Introduction to Machine Learning". Cham, Switzerland: Springer.
  4. Mohammed, M., Khan, M. B., & Bashier, E. B. M. (2016). "Machine Learning: Algorithms and Applications". Crc Press.
  5. Dey, A. (2016). "Machine Learning Algorithms: A Review". International Journal of Computer Science and Information Technologies, 7 (3), 1174-1179.
  6. Bonaccorso, G. (2018). "Machine Learning Algorithms: Popular Algorithms for Data Science and Machine Learning". Packt Publishing.
  7. Jo, T. (2021). "Machine Learning Foundations: Supervised, Unsupervised, and Advanced Learning". Springer.
  8. Chopra, D., & Khurana, R. (2023). "Introduction to Machine Learning with Python". Bentham Science Publishers.
  9. Müller, A. C., & Guido, S. (2016). "Introduction to Machine Learning with Python: A Guide for Data Scientists". O'Reilly Media.
  10. Raschka, S. (2015). "Python Machine Learning". Packt Publishing.
  11. Forsyth, D. (2019). "Applied Machine Learning". Cham, Switzerland: Springer.
  12. Sarkar, D., Bali, R., & Sharma, T. (2018). "Practical Machine Learning with Python". Apress.
  13. Swamynathan, M. (2019). "Mastering Machine Learning with Python in Six Steps: A Practical Implementation Guide to Predictive Data Analytics using Python". Apress.
  14. Kong, Q., Siauw, T., & Bayen, A. (2020). "Python Programming and Numerical Methods: A Guide for Engineers and Scientists". Academic Press.
  15. Unpingco, J. (2022). "Python for Probability, Statistics, and Machine Learning". Cham, Switzerland: Springer.
  16. Brandt, S. (2014). "Data Analysis: Statistical and Computational Methods for Scientists and Engineers". Springer.
  17. VanderPlas, J. (2017). "Python Data Science Handbook: Essential Tools for Working with Data". O'Reilly Media.
  18. James, G., Witten, D., Hastie, T., Tibshirani, R., & Taylor, J. (2023). "An Introduction to Statistical Learning: With Applications in Python". Springer Nature.
  19. Young, D. S. (2017). "Handbook of Regression Methods". Chapman and Hall/CRC.
  20. Allison, P. D. (1999). "Multiple Regression: A Primer". Pine Forge Press.
  21. Berry, W. D., & Feldman, S. (1985). "Multiple Regression in Practice". Sage.
  22. Kutner, M. H., Nachtsheim, C. J., Neter, J., & Li, W. (2005). "Applied Linear Statistical Models". McGraw-Hill/Irwin.
  23. Sen, A., & Srivastava, M. (2012). "Regression Analysis: Theory, Methods, and Applications". New York, NY: Springer.
  24. Darlington, R. B., & Hayes, A. F. (2016). "Regression Analysis and Linear Models: Concepts, Applications, and Implementation". Guilford Publications.
  25. Montgomery, D.C., Peck, E.A., Vining G. G. (2021). "Introduction to Linear Regression Analysis". John Wiley & Sons.
  26. Olive, D. J. (2017). "Linear Regression". Berlin: Springer International Publishing.
  27. Seber, G. A., & Lee, A. J. (2003). "Linear Regression Analysis". John Wiley & Sons.
  28. Yan, X., & Su, X. (2009). "Linear Regression Analysis: Theory and Computing". World Scientific.
  29. Kutner, N., Nachtsheim, C., & Neter, J. (2004). "Applied Linear Regression Models". McGraw-Hill.
  30. Weisberg, S. (2005). "Applied Linear Regression". John Wiley & Sons.
  31. Rawlings, J. O., Pantula, S. G., & Dickey, D. A. (1998). "Applied Regression Analysis: A Research Tool". New York, NY: Springer.
  32. Massaron, L., & Boschetti, A. (2016). "Regression Analysis with Python". Packt Publishing.
  33. Python: https://www.python.org
  34. Numpy: https://www.numpy.org
  35. Pandas: https:// pandas.pydata.org
  36. Matplotlib: https://www. matplotlib.org
  37. NLTK: https://www.nltk.org
  38. SciPy: https://scipy.org
  39. SK Learn: https://scikit-learn.org
  40. Kaggle: https://www.kaggle.com
Index Terms

Computer Science
Information Sciences

Keywords

Artificial Intelligence Machine Learning Prediction Multiple Regression Least Squares Mean Squared Error Gradient Descent Python Programming