Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the components of LDA #2

Open
immortal13 opened this issue Nov 30, 2020 · 2 comments
Open

the components of LDA #2

immortal13 opened this issue Nov 30, 2020 · 2 comments

Comments

@immortal13
Copy link

Thanks for your innovative and interesting work!
Could you please tell me why you choose (n_classes-1) components in LDA?
And can sklearn.SLIC() accept a multichannel image? (for PaviaU data set, there supposed to be 8 channels)

@qichaoliu
Copy link
Owner

Thanks for the questions, and
Answer to Question 1: The LDA is a supervised method that can project the raw data into a subspace according to the given training samples. Assuming that there are C classes in the training data, then the LDA could only reduce its dimension to [1, C-1], which is determined by the algorithm. To preserve as much as information, choosing the (C-1) components seems to be more reasonable.
Answer to Question 2: Yes, it can!

By the way, the LDA is not important here. You can replace it with other methods such as PCA, MNF, or even remove it if you want.

@immortal13
Copy link
Author

Thanks for your prompt reply!It helps a lot. (^▽^)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants