International Journal of Computer Applications |
Foundation of Computer Science (FCS), NY, USA |
Volume 186 - Number 6 |
Year of Publication: 2024 |
Authors: Ahmad Farhan AlShammari |
10.5120/ijca2024923400 |
Ahmad Farhan AlShammari . Implementation of Curve Fitting using Polynomial Regression in Python. International Journal of Computer Applications. 186, 6 ( Jan 2024), 27-32. DOI=10.5120/ijca2024923400
The goal of this research is to develop a curve fitting program using polynomial regression in Python. Curve fitting is an important application in machine learning. It helps to find the curve that best fits to the data points. The polynomial regression is used to model the relationship between the independent variable (x) and the dependent variable (y) using a polynomial function of degree (n). Polynomial regression can provide linear and non-linear models. The basic steps of curve fitting using polynomial regression are explained: preparing observed points, computing matrix, computing transpose of matrix, multiplying by transpose, performing forward elimination, performing back substitution, finding out coefficients, making polynomial equation, computing predicted points, and plotting curve. The developed program was tested on an experimental dataset from Kaggle. The program successfully performed the basic steps of curve fitting using polynomial regression and provided the required results.