KMNIST kNN · Issue #10 · rois-codh/kmnist (original) (raw)
Adding PCA dimension reduction produces better Test Accuracyx_train = x_train.reshape(-1, 784)
x_test = x_test.reshape(-1, 784)
After this code rows:pca = PCA(n_components= 60, random_state= 0 )
x_train = pca.fit_transform(x_train)
x_test = pca.transform(x_test)
The resulting is Test accuracy: 0.9398