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