• 大小: 40KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-08-26
  • 语言: Matlab
  • 标签: fisher  matlab  分类器  

资源简介

Fisher线性判别(Fisher Linear Discrimination,FLD),也称线性判别式分析(Linear Discriminant Analysis, LDA)。FLD是基于样本类别进行整体特征提取的有效方法。它在使用PCA方法进行降维的基础上考虑到训练样本的类间信息。FLD方法在进行图像整体特征提取方面有着广泛的应用。压缩包中有完整的代码与结果图

资源截图

代码片段和文件信息

%%%%%%%%%%%%%%%%%%%%%%%%%% Draw Graph %%%%%%%%%%%%%%%%%%%%%%%%%%
function DrawGraph(TrainingTestSetE)
b=[Training.y1Training.y2Training.y3Training.y4];
% 画测试集的图
for k=1:4   %要画4张图
Draw.C1=[1:TestSet.n1-E(k1);1:TestSet.n1-E(k1)];    % 第一类中正确样本集合
Draw.E1=[1:E(k1);1:E(k1)];                          % 第一类中错误样本集合
Draw.C2=[1:TestSet.n2-E(k2);1:TestSet.n2-E(k2)];
Draw.E2=[1:E(k2);1:E(k2)];
c1=0;
e1=0;
c2=0;
e2=0;
for i=1:TestSet.n
    y=Training.W*TestSet.X(i:)‘-b(k);
    if TestSet.CN(i)==1
        if TestSet.CN(i)*y<0
            e1=e1+1;
            Draw.E1(1e1)=TestSet.X(i1);
            Draw.E1(2e1)=TestSet.X(i2);                    
        else
            c1=c1+1;
            Draw.C1(1c1)=TestSet.X(i1);
            Draw.C1(2c1)=TestSet.X(i2);        
        end
    else
        if TestSet.CN(i)*y<0
            e2=e2+1;
            Draw.E2(1e2)=TestSet.X(i1);
            Draw.E2(2e2)=TestSet.X(i2);                    
        else
            c2=c2+1;
            Draw.C2(1c2)=TestSet.X(i1);
            Draw.C2(2c2)=TestSet.X(i2);        
        end
    end
end
X1=[145:185];
X2=(b(k)-X1*Training.W(1))/Training.W(2);
subplot(22k);
plot(Draw.C1(1:)Draw.C1(2:)‘x‘Draw.E1(1:)Draw.E1(2:)‘rx‘...   % 画正类样本
     Draw.C2(1:)Draw.C2(2:)‘o‘Draw.E2(1:)Draw.E2(2:)‘ro‘...
     X1X2);
title([‘y‘ int2str(k)]);
end
%%%%%%%%%%%%%%%%%%%%%%%% Draw Graph End %%%%%%%%%%%%%%%%%%%%%%%%

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1517  2007-05-09 09:40  fisher\fish\DrawGraph.m

     文件        826  2007-05-09 09:28  fisher\fish\Fisher.m

     文件     236278  2007-05-09 12:14  fisher\fish\fisher判别.bmp

     文件      12973  2007-05-09 11:40  fisher\fish\fisher判别.fig

     文件     236278  2007-05-09 12:14  fisher\fish\fisher判别孤点.bmp

     文件      12999  2007-05-09 11:39  fisher\fish\fisher判别孤点.fig

     文件        653  2018-11-07 20:02  fisher\fish\ReadStudent.m

     文件        764  2007-05-09 09:13  fisher\fish\Test_Set.m

     文件       2541  2007-05-09 09:36  fisher\fish\Train_Set.m

     文件       1218  2007-05-09 12:21  fisher\fish\实验结果.txt

    ..A.SHR       264  2006-04-03 09:32  fisher\fish\男女学生数据\Desktop.ini

    ..A.SHR         2  2006-11-02 14:51  fisher\fish\男女学生数据\Folder.htt

     文件       2459  2007-05-09 08:34  fisher\fish\男女学生数据\StudentsData1.txt

     文件       2503  2007-05-09 08:36  fisher\fish\男女学生数据\StudentsData2.txt

     目录          0  2018-11-07 19:47  fisher\fish\男女学生数据

     目录          0  2018-12-06 16:26  fisher\fish

     目录          0  2018-12-08 06:35  fisher

----------- ---------  ---------- -----  ----

               511275                    17


评论

共有 条评论