Algoritmo das Projeções Sucessivas Para Seleção de ... - PPGQ
Algoritmo das Projeções Sucessivas Para Seleção de ... - PPGQ
Algoritmo das Projeções Sucessivas Para Seleção de ... - PPGQ
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Anexos<br />
Programas Auxiliares do SPA-LDA<br />
• multilda.m<br />
• mahal2.m<br />
1) multilda.m<br />
function [class,errors] = multilda(sample,training,group,Group_Test)<br />
%MULTILDA Multi-Class Linear discriminant analysis.<br />
% [class,errors] = multilda(sample,training,group,Group_Test) classifies each row<br />
% of the data in SAMPLE into one of the values of the vector<br />
% GROUP. GROUP contains integers from one to the number of<br />
% groups in the training set, which is the matrix, TRAINING.<br />
%<br />
% SAMPLE and TRAINING must have the same number of columns.<br />
% TRAINING and GROUP must have the same number of rows.<br />
% CLASS is a vector with the same number of rows as SAMPLE.<br />
%<br />
% The biased Maximum-Likelihood estimate for the covariance matrix is employed: cov(X,1)<br />
%<br />
% B.A. Jones 2-05-95<br />
% Copyright 1993-2000 The MathWorks, Inc.<br />
% $Revision: 2.9 $ $Date: 2000/05/26 17:28:36 $<br />
[gr,gc] = size(group);<br />
if min(gr,gc) ~= 1<br />
error('Requires the third argument to be a vector.');<br />
end<br />
if gc ~= 1,<br />
group = group(:);<br />
gr = gc;<br />
end<br />
if any(group - round(group)) | any(group < 1)<br />
error('The third input argument must be positive integers.');<br />
end<br />
maxg = max(group);<br />
[tr,tc] = size(training);<br />
121