电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

属性约简(MATLAB算法)有实例有讲解

属性约简(MATLAB算法)有实例有讲解_第1页
1/7
属性约简(MATLAB算法)有实例有讲解_第2页
2/7
属性约简(MATLAB算法)有实例有讲解_第3页
3/7
粗糙集 属性约简 题目: SARS 诊断 注:这是我学粗糙集时老师给的作业 U 干咳 呼吸困难 血液检测 高烧38度 X射线 浓痰 血细胞多 寒战 肌肉酸痛 乏力 胸膜痛 头痛 非典 1 1 1 1 1 0 0 0 0 1 1 0 1 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 3 1 0 1 0 0 0 0 0 0 1 0 0 0 4 0 0 0 1 1 1 1 0 1 0 1 1 0 5 1 0 0 1 1 1 1 1 0 1 1 0 0 6 0 1 0 1 1 1 1 1 1 0 0 1 0 7 1 0 0 0 1 1 1 0 0 1 1 1 0 8 1 1 1 1 0 0 0 0 1 1 0 1 1 9 1 0 1 1 1 0 0 0 1 1 0 1 1 10 1 1 1 1 0 0 0 0 1 1 0 1 1 11 1 0 1 1 1 0 0 0 1 1 0 1 1 12 1 0 1 1 1 0 0 0 1 1 0 1 1 属性约简的顺序如下:求正域、生成未经处理的区分矩阵、对区分矩阵进行化简、求核、对已经处理过的区分矩阵进行属性约简。约简后的决策表有 26 行,所有 12 个属性都是正域中的属性,核为空 程序: % main.m tic; a=[ 1,1,1,1,0,0,0,0,1,1,0,1; 0,0,0,0,0,0,0,0,0,0,0,0; 1,0,1,0,0,0,0,0,0,1,0,0; 0,0,0,1,1,1,1,0,1,0,1,1; 1,0,0,1,1,1,1,1,0,1,1,0; 0,1,0,1,1,1,1,1,1,0,0,1; 1,0,0,0,1,1,1,0,0,1,1,1; 1,1,1,1,0,0,0,0,1,1,0,1; 1,0,1,1,1,0,0,0,1,1,0,1; 1,1,1,1,0,0,0,0,1,1,0,1; 1,0,1,1,1,0,0,0,1,1,0,1; 1,0,1,1,1,0,0,0,1,1,0,1 ]; d=[1;0;0;0;0;0;0;1;1;1;1;1]; pos=posCD(a,d); dismat=dismatrix(a,d,pos); dism=disbe(dismat); core=cor(dism); [red,row]=redu(dism); time=toc % dismatrix.m % 生成未经处理的区分矩阵 dismat function dismat=dismatrix(a,d,pos) [m,n]=size(a); p=1; index1=0;index2=0;index=0; dis=-1*ones(m*(m-1)/2,n); for i=1:m for j=i+1:m if (isxbelongtopos(i,pos)&~isxbelongtopos(j,pos))... |(~isxbelongtopos(i,pos)&isxbelongtopos(j,pos))... |(isxbelongtopos(i,pos)&isxbelongtopos(j,pos)&~isxybelongtoindD(i,j,d)) index2=1; end if index2==0 continue; end for k=1:n if a(i,k)~=a(j,k) dis(p,k)=1; index1=1; else dis(p,k)=0; end end if index1==1 p=p+1;index=1; end index1=0; index2=0; end end if p<=m*(m-1)/2 if index==0 dismat=[]; return; end if dis(p,1)==-...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

属性约简(MATLAB算法)有实例有讲解

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部