text_plain_output_5.png text_plain_output_9.png text_plain_output_4.png image_output_5.png text_plain_output_10.png text_plain_output_6.png image_output_7.png text_plain_output_3.png image_output_4.png text_plain_output_7.png image_output_8.png text_plain_output_8.png image_output_6.png text_plain_output_2.png text_plain_output_1.png image_output_3.png image_output_2.png image_output_1.png image_output_10.png image_output_9.png
from sklearn.metrics import accuracy_score

import numpy as np

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

y_pred = lda.predict(X_test)

w = lda.coef_
w.shape

w0 = lda.intercept_
np.transpose(w0).shape