
Statistics for Data Science
By :

So, let's get started with some statistical assessment work!
As we discussed in the previous section, instead of using all the data (the entire population of observations) to train a statistical model (and then test using some of that data), cross-validation divides the data into training and testing datasets.
The first step that a data scientist needs to take when he or she is interested in using cross-validation to assess the performance of a statistical model is to organize (or split) the data into two separate subsets.
There are actually several approaches of cross-validation:
This cross-validation approaches all focus on how to split the data for the training, testing, and validation. Each has its own merit (pros and cons).
There are (as always) many approaches to programming a problem. The following is one such simple method...