What does numpy.random.seed(0) do?

What does np.random.seed do in the below code from a Scikit-Learn tutorial? I’m not very familiar with NumPy’s random state generator stuff, so I’d really appreciate a layman’s terms explanation of this.

np.random.seed(0)
indices = np.random.permutation(len(iris_X))

11 Answers
11

Leave a Comment