3

I use Python and sklearn packages. I used LDA for predictions and I can get the coefficients of the decision boundary.

clf = LinearDiscriminantAnalysis(priors=[prob_norm, prob_anem]) 
clf.fit(X_train, y_train)
y_predict = clf.predict(X_test)
print(clf.coef_[0][0], clf.coef_[0][1], clf.intercept_)

The same goes for QDA:

qda = QuadraticDiscriminantAnalysis(store_covariance=True)
qda.fit(X_train, y_train)
y_predict = qda.predict(X_test)

But there are no attributes to get decision boundary parameters.

However, there is a phrase for QDA:

But it does not contain the coefficients of the linear discriminants, because the QDA classifier involves a quadratic, rather than a linear, function of the predictors.

It there any method to extract the parameters for the decision boundary for QDA? I just don't understand the significant difference between linear and quadratic equations in this case. Why it is possible to get linear but it's not for quadratic.

Arzental
  • 103
  • 6

0 Answers0