Random State
The key to reproducing the same results is called random state. You simply specify a number, and whenever that number is used, the same results will be produced. This works because computers don't have an actual random number generator. Instead, they have a pseudo-random number generator. This means that you can generate the same sequence of random numbers if you set a random state.
Consider the following figure as an example. The columns are your random states. If you pick 0 as the random state, the following numbers will be generated: 41, 52, 38, 56…
However, if you pick 1 as the random state, a different set of numbers will be generated, and so on.
In the previous exercise, you set the random state to 0 so that the experiment was repeatable.
Exercise 7.02: Setting a Random State When Splitting Data
The goal of this exercise is to have a reproducible way of splitting...