-fold cross validation now there is way around this problemcalled -fold cross-validationand we'll look at an example of this later in the bookbut the basic concept is you train/test many times so you actually split your data not into just one training set and one test setbut into multiple randomly assigned segmentsk segments that' where the comes from and you reserve one of those segments as your test dataand then you start training your model on the remaining segments and measure their performance against your test dataset then you take the average performance from each of those training setsmodelsresults and take their -squared average score so this wayyou're actually training on different slices of your datameasuring them against the same test setand if you have model that' overfitting to particular segment of your training datathen it will get averaged out by the other ones that are contributing to -fold cross-validation here are the -fold cross validation steps split your data into randomly-assigned segments reserve one segment as your test data train on each of the remaining - segments and measure their performance against the test set take the average of the - -squared scores this will make more sense later in the bookright now would just like for you to know that this tool exists for actually making train/test even more robust than it already is so let' go and actually play with some data and actually evaluate it using train/test next using train/test to prevent overfitting of polynomial regression let' put train/test into action so you might remember that regression can be thought of as form of supervised machine learning let' just take polynomial regressionwhich we covered earlierand use train/test to try to find the right degree polynomial to fit given set of data