代码:
px = X_pca[:, 0][y_train.as_matrix() == i] # python3.X报错
原因:
python3.X中as_matrix()不可用
修改:
px = X_pca[:, 0][y_train.values == i]