I\'m using the nltk library\'s movie_reviews corpus which contains a large number of documents. My task is get predictive performance of these reviews
nltk
movie_reviews
I get a easy way to do this
import numpy as np a = np.array([0,1,2,3,4]) b = np.array([5,6,7,8,9]) indices = np.arange(a.shape[0]) np.random.shuffle(indices) a = a[indices] b = b[indices] # a, array([3, 4, 1, 2, 0]) # b, array([8, 9, 6, 7, 5])