标签: python shuffle
我要问的是,使用Fisher-Yates改组算法对数据集进行改组与使用np.random.permutation相比有什么区别,就像下面的代码片段一样:
np.random.permutation
X.shape[1] # number of training examples permutation = list(np.random.permutation(m)) shuffled_X = X[:, permutation] shuffled_Y = Y[:, permutation].reshape((1,m))