Figure 1: Polynomial regression under fit, good fit and over fit
If we are fitting a polynomial regression model to our data, we need to decide on the degree of the polynomial.
Using an appropriate degree is very important since using a lower degree may underfit the data and usnig a higher degree may overfit.
In the below example we will fit polynomials of different degrees and see underfit, good fit and overfit models.
This program uses dataset file which can be downloaded from: TempLinkoping2016.csv