資源簡介
LDA(Linear discriminate analysis) 分類器 。寫成了MATLAB函數(shù),效果還不錯。
代碼片段和文件信息
function?[train_ldatest_lda]?=?FisherLDA(traintr_labeltest)
%?LDA:?Linear?discriminant?analysis?(Fisherfaces?approach??PCA+LDA)
%
%
%?Argument:??????train‘??????????????????-?A?2D?matrix?containing?all?image?vectors.
%?????????????????????????????????????????Suppose?all?P?images?in?the?training?database?have?the?
%?????????????????????????????????????????same?size?of?MxN.?(where?M?is?number?of?sampled?“distance“
%?????????????????????????????????????????datas?for?each?instaneous?face?and?N?is?the?number
%?????????????????????????????????????????of?instaneous?faces?)??So?the?length?of?1D?
%?????????????????????????????????????????column?vectors?is?M*N?and?‘T‘?will?be?a?(M*N)xP?2D?matrix.
%????????????????tr_label???????????????-?(1*P)?Labeles?of?each?training?data.
%????????????????test
評論
共有 條評論