资源简介

利用D-S证据理论进行数据融合,应用于无线传感器网络目标定位,决策级融合

资源截图

代码片段和文件信息

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%     支持向量机的核心程序,计算判决方程的权系数等参量         %%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [alpha_star a_star bias p b]=ddsvmm(xysigmacy)
xx=x;
yy=y;
ker_param=sigma;                                       %%%%%%%%设置核函数参数
[Dim Nf]= size(xx);
z = 2*(yy==cy) - 1;                                      %%%%%%%将类别矩阵转化为逻辑矩阵,构造二类分类器
p = zeros(Nf);
for i = 1:Nf
     p(:i)= exp(-sum((xx-xx(:i)*ones(1Nf)).^2)‘/(2*ker_param^2));       %%选用径向基函数作为核函数
end
    alpha_star = quadprog((z‘*z).*(p‘*p) -ones(1 Nf) [] [] z0 0);  %%计算权值
    a_star = p*(alpha_star.*z‘);
    in = find(alpha_star > 0);                                             %%找权值为正的下标 
if isempty(in)
      bias = 0;                                   
  else
   B= z(in) - a_star‘* p(:in);                                             %%%求偏置
      bias = mean(B);
end
  sv = find(abs(a_star) > 1e-10);                                           %%找支持向量
Nsv = length(sv);
if isempty(sv)
  error(‘No support vectors found‘);
else
  disp([‘Found ‘ num2str(Nsv) ‘ support vectors‘])
end
b = 1/sqrt(sum(a_star.^2));                                                %% 求最大化边缘



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

     文件       1411  2011-06-21 11:09  ds仿真\ddsvmm.m

     文件        870  2011-07-10 10:52  ds仿真\ds.m

     文件       1150  2008-06-20 10:48  ds仿真\lmsdemo.m

     目录          0  2012-01-09 20:38  ds仿真

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

                 3431                    4


评论

共有 条评论