MatLab PCA-LDA Code

22 次查看(过去 30 天)
Avery Wood
Avery Wood 2019-11-22
评论: Avery Wood 2019-11-22
I am in need of a PCA-LDA (linear discriminant analysis) code that is fully annotated with a graphical output that shows separation. All the codes I've found on here are not fully annotated or explained. I've worked with PCA, but I'm new to LDA. HELP.

回答(1 个)

the cyclist
the cyclist 2019-11-22
If you have the Statistics and Machine Learning Toolbox, then you can use the built-in pca function.
I'm not sure what you mean by "fully annotated". If you are hoping for code that is highly commented and explains what is going on, then you might want to take a look at my answer to this question, where I go into some detail for a simple example, and answer several users' questions.
If you mean you want the PCA components annotated, then maybe the biplot function is useful? Take a look at the examples in the documentation.
Regarding LDA ... you'll need the Text Analytics Toolbox. You could start by taking a look at the fitlda function. I can't help much there, as I don't have the toolbox and I've only done LDA in R.
There are some really good video available on the theory. This lecture by David Blei goes into a lot of depth.
  3 个评论
the cyclist
the cyclist 2019-11-22
Oh, sorry! Looks like that is also in the Stats toolbox, e.g. here. I haven't used it at all.
Avery Wood
Avery Wood 2019-11-22
No worries! I should have clarified more.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Dimensionality Reduction and Feature Extraction 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by