10BC0 Linear discriminant analysis n_components query · scikit-learn scikit-learn · Discussion #33073 · GitHub
[go: up one dir, main page]

Skip to content
Discussion options

You must be logged in to vote

The goal of LinearDiscriminantAnalysis is to find the linear discriminants that maximize class separability. If there were more than C-1 n_components, the geometry would not be valid because the maximum number of discriminants that you can fit between C classes is C-1.

Also, LDA primarily works by decomposing the between-class and within-class scatter metrics into eigenvalues and eigenvectors. If the rank of the between-class scatter matrix goes beyond C-1, it will not find any eigenvector that represents a proper discriminant. So, there is no way LDA can work with n_components more than C-1

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by atifiqbalsascha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
0