the error is , , which is almost half the error of the straight-line model this is goodhoweverit comes with price we now have more complex functionmeaning that we have one more parameter to tune inside polyfit(the fitted polynomial is as followsf( ** soif more complexity gives better resultswhy not increase the complexity even morelet' try it for degree and the more complex the data getsthe curves capture it and make it fit better the errors seem to tell the same story error = , , error = , , error = , , error = , , error = , , howevertaking closer look at the fitted curveswe start to wonder whether they also capture the true process that generated this data framed differentlydo our models correctly represent the underlying mass behavior of customers visiting our websitelooking at the polynomial of degree and we see wildly oscillating behavior it seems that the models are fitted too much to the data so much that it is now capturing not only the underlying process but also the noise this is called overfitting