Code covered by the BSD License  

Highlights from
Discriminant Analysis Programme

image thumbnail
from Discriminant Analysis Programme by Bartolomeu Rabacal
Discrimination and Classification of data to and from groups with classical/robust estimation

Tbsc(alpha,p);
function res = Tbsc(alpha,p);

% constant for Tukey Biweight S 

talpha = sqrt(chi2inv(1-alpha,p));
maxit = 1000; 
eps = 10^(-8);
diff = 10^6;
ctest = talpha;
iter = 1;
while ((diff>eps) & iter<maxit)
    cold = ctest;
    ctest = Tbsb(cold,p)/alpha;
    diff = abs(cold-ctest);
    iter = iter+1;
end
res = (ctest);

%----------------------------------------------------------------------- 

Contact us at files@mathworks.com