CFP last date
20 January 2025
Reseach Article

Implementation of Polynomial 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 27
Year of Publication: 2024
Authors: Ahmad Farhan AlShammari
10.5120/ijca2024923806

Ahmad Farhan AlShammari . Implementation of Polynomial Regression using Least Squares and Gradient Descent in Python. International Journal of Computer Applications. 186, 27 ( Jun 2024), 20-26. DOI=10.5120/ijca2024923806

@article{ 10.5120/ijca2024923806,
author = { Ahmad Farhan AlShammari },
title = { Implementation of Polynomial Regression using Least Squares and Gradient Descent in Python },
journal = { International Journal of Computer Applications },
issue_date = { Jun 2024 },
volume = { 186 },
number = { 27 },
month = { Jun },
year = { 2024 },
issn = { 0975-8887 },
pages = { 20-26 },
numpages = {9},
url = { https://ijcaonline.org/archives/volume186/number27/implementation-of-polynomial-regression-using-least-squares-and-gradient-descent-in-python/ },
doi = { 10.5120/ijca2024923806 },
publisher = {Foundation of Computer Science (FCS), NY, USA},
address = {New York, USA}
}
%0 Journal Article
%1 2024-06-20T00:35:29+05:30
%A Ahmad Farhan AlShammari
%T Implementation of Polynomial Regression using Least Squares and Gradient Descent in Python
%J International Journal of Computer Applications
%@ 0975-8887
%V 186
%N 27
%P 20-26
%D 2024
%I Foundation of Computer Science (FCS), NY, USA
Abstract

The goal of this research is to develop a polynomial regression program using least squares and gradient descent in Python. Polynomial regression helps to predict the output data based on the features of the input data using a polynomial function of degree (n). 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 polynomial regression using least squares and gradient descent are explained: preparing observed data, computing matrix of features, initializing weights, computing predicted data, computing error function, computing partial derivatives, updating weights, computing final predictions, and plotting predicted data. The developed program was tested on an experimental dataset. The program successfully performed the basic steps of polynomial 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. Holmes, M. H. (2023). "Introduction to Scientific Computing and Data Analysis". Springer Nature.
  14. Brandt, S. (2014). "Data Analysis: Statistical and Computational Methods for Scientists and Engineers". Springer.
  15. Igual, L., & Seguí, S. (2024). "Introduction to Data Science: A Python Approach to Concepts, Techniques and Applications". Springer Nature.
  16. Qamar, U., & Raza, M. S. (2023). "Data Science Concepts and Techniques with Applications". Berlin/Heidelberg, Germany: Springer.
  17. Aggarwal, C. C. (2024). "Probability and Statistics for Machine Learning: A Textbook". Cham, Switzerland: Springer.
  18. VanderPlas, J. (2017). "Python Data Science Handbook: Essential Tools for Working with Data". O'Reilly Media.
  19. James, G., Witten, D., Hastie, T., Tibshirani, R., & Taylor, J. (2023). "An Introduction to Statistical Learning: With Applications in Python". Springer Nature.
  20. Kong, Q., Siauw, T., & Bayen, A. (2020). "Python Programming and Numerical Methods: A Guide for Engineers and Scientists". Academic Press.
  21. Peckov, A. (2012). "A Machine Learning Approach to Polynomial Regression". Ljubljana, Slovenia.
  22. Ostertagová, E. (2012). "Modelling using Polynomial Regression". Procedia Engineering, 48, 500-506.
  23. Groß, J. (2003). "Linear Regression". Springer Science & Business Media.
  24. Olive, D. J. (2017). "Linear Regression". Berlin, Germany: Springer.
  25. Yan, X., & Su, X. (2009). "Linear Regression Analysis: Theory and Computing". World Scientific.
  26. Schroeder, L. D., Sjoquist, D. L., & Stephan, P. E. (2016). "Understanding Regression Analysis: An Introductory Guide". Sage Publications.
  27. Montgomery, D.C., Peck, E.A., Vining G. G. (20012). "Introduction to Linear Regression Analysis". Wiley Series in Probability and Statistics: John Wiley & Sons.
  28. Kutner, N., Nachtsheim, C., & Neter, J. (2004). "Applied Linear Regression Models". McGraw-Hill/Irwin Series: Operations and Decision Sciences.
  29. Seber, G. A., & Lee, A. J. (2003). "Linear Regression Analysis". John Wiley & Sons.
  30. Leemis, L.M. (1991). "Applied Linear Regression Models". Journal of Quality Technology, 23, 76-77.
  31. Weisberg, S. (2005). "Applied Linear Regression". John Wiley & Sons.
  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 Polynomial Regression Least Squares Mean Squared Error MSE Gradient Descent Python Programming