📅  最后修改于: 2022-03-11 14:45:28.330000             🧑  作者: Mango
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA
lda = LDA(n_components = 2)
X_train = lda.fit_transform(X_train, y_train)
X_test = lda.transform(X_test)