Diagonal Quadratic Linear discriminant and Diagonal Linear discriminant analysis in python

161 Views Asked by At

I implemented linear discriminant analysis and quadratic discriminant analysis on my dataset using LDA() and QDA() functions in sklearn python as classifier to predict cancer dataset. now I need to do diagonal linear discriminant analysis and diagonal quadratic discriminant analysis but, I don't know how to do it. Is there any specific function in python like LDA() or I need to modify LDA and QDA function to perform diagonal?

from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA
classifier=LDA()
classifier.fit(X_train, y_train)
y_pred = classifier.predict(X_test)
0

There are 0 best solutions below