Use of cross validation for Polynomial Regression I've two text files which contains my data.
One text file on X axis another text file on Y axis
Then using scatter function from python I did the data visualization
After that, I used polyfit function from python to get the curve which will fit my data
In that polyfit function we need to write degree of the polynomial we want eg. 2 or 3
Now let's consider I got 4 such a equations of degrees 2,3,4,5 respectively.
Now here comes my problem.
Among all those equations I got, how can I select the best equation which fits my data. I want to use cross validation here. Any high level library function can be use. My language is Python.
I think that you want this:

K-fold

If you want say MSE of each check out section 3.1.1 here:

cross validated metrics