text_plain_output_1.png
from sklearn.metrics import accuracy_score

lda = LDA(n_components=1)
X_train_r2 = lda.fit(X_train, y_train)

y_pred = lda.predict(X_test)
print(accuracy_score(y_test, y_pred))
print(y_pred.shape)