lundi 19 décembre 2016

Pick randomly index of samples in dataset

I ve got in python a dataset of 31 samples. I want to split it the datasett randomly 30 times in 30 training samples and 1 samples test samples, how can I do so?

Right now I just split using the first 30 for training and the last one for testing like this:

training_this_round = training[0:30]

testing_this_round =training[30:31]

How can I pick the rows of the matrix randomly?




Aucun commentaire:

Enregistrer un commentaire