at this pointwe have the following choicesselecting one of the fitted polynomial models switching to another more complex model classsplinesthinking differently about the data and starting again of the five fitted modelsthe first-order model clearly is too simpleand the models of order and are clearly overfitting only the secondand third-order models seem to somehow match the data howeverif we extrapolate them at both borderswe see them going berserk switching to more complex class also seems to be the wrong way to go about it what arguments would back which classat this pointwe realize that we probably have not completely understood our data stepping back to go forward another look at our data sowe step back and take another look at the data it seems that there is an inflection point between weeks and so let us separate the data and train two lines using week as separation point we train the first line with the data up to week and the second line with the remaining data inflection * * calculate the inflection point in hours xa [:inflectiondata before the inflection point ya [:inflectionxb [inflection:data after yb [inflection:fa sp poly (sp polyfit(xaya )fb sp poly (sp polyfit(xbyb )fa_error error(faxayafb_error error(fbxbybprint("error inflection=% (fa fb_error)error inflection= , , plotting the two models for the two data ranges gives the following chart