{"id":727,"date":"2018-06-20T15:14:57","date_gmt":"2018-06-20T15:14:57","guid":{"rendered":"http:\/\/muthu.co\/?p=727"},"modified":"2021-05-24T03:36:50","modified_gmt":"2021-05-24T03:36:50","slug":"simple-example-of-polynomial-regression-using-python","status":"publish","type":"post","link":"http:\/\/write.muthu.co\/simple-example-of-polynomial-regression-using-python\/","title":{"rendered":"Simple example of Polynomial regression using Python"},"content":{"rendered":"\n
Previously<\/a> I wrote an article explaining the underlying maths behind polynomial regression. In this post I will use Python libraries to regress a simple dataset to see polynomial regression in action. If you want to fully understand the internals I recommend you read my previous post.<\/a><\/p>\n\n\n\n Polynomial regression is a method of finding an nth<\/em> degree polynomial function which is the closest approximation of our data points. Simply put, If my simple line<\/a> doesn’t fit my data set, I will go on and try to find a quadratic, a cubic or a much higher degree function which might fit. How to find which degree to use is a decision which depends completely on the data at hand. A quick glance at a simple scatter plot can reveal a lot about the curvilinear relationship between the data points. Take a look at the below graphs of different degrees of polynomial, this is important because this is what we are trying to fit our data point into.<\/p>\n\n\n\n