this is bias-variance trade-off you know the decision you have to make between how overall accurate your values areand how spread out they are or how tightly clustered they are that' the bias-variance trade-off and they both contribute to the overall errorwhich is the thing you really care about minimizing sokeep those terms in mindk-fold cross-validation to avoid overfitting earlier in the bookwe talked about train and test as good way of preventing overfitting and actually measuring how well your model can perform on data it' never seen before we can take that to the next level with technique called -fold cross-validation solet' talk about this powerful tool in your arsenal for fighting overfittingk-fold cross-validation and learn how that works to recall from train/testthe idea was that we split all of our data that we're building machine learning model based off of into two segmentsa training datasetand test dataset the idea is that we train our model only using the data in our training datasetand then we evaluate its performance using the data that we reserved for our test dataset that prevents us from overfitting to the data that we have because we're testing the model against data that it' never seen before howevertrain/test still has its limitationsyou could still end up overfitting to your specific train/test split maybe your training dataset isn' really representative of the entire datasetand too much stuff ended up in your training dataset that skews things sothat' where kfold cross-validation comes init takes train/test and kicks it up notch the ideaalthough it sounds complicatedis fairly simple instead of dividing our data into two bucketsone for training and one for testingwe divide it into buckets we reserve one of those buckets for testing purposesfor evaluating the results of our model we train our model against the remaining buckets that we havek- and then we take our test dataset and use that to evaluate how well our model did amongst all of those different training datasets we average those resulting error metricsthat isthose -squared valuestogether to get final error metric from -fold cross-validation