I have got two datasets new_train_db1
(with size 3000x200) and new_train_db2
(with size 3000x200) and the correspondant labels train_labels
(3000x1). I want to subsample new_train_db1
, new_train_db2
and train_labels
and keeping just 100 samples. I have the following code:
np.random.seed(0)
reduced_train_db1 = new_train_db1[np.random.randint(new_train_db1.shape[0], size=100), :]
np.random.seed(0)
reduced_train_db2 = new_train_db2[np.random.randint(new_train_db2.shape[0], size=100), :]
np.random.seed(0)
reduced_labels = train_labels[np.random.randint(train_labels.shape[0], size=100)]
Actually, what i want is to keep the same samples every time that I run the code. How can I do so?