当前位置: 首页 > news >正文

福州网站怎么做的上海网络营销

福州网站怎么做的,上海网络营销,宁波个人做网站,wordpress首页添加登录MATLAB聚类有效性评价指标(外部)作者#xff1a;凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/更多内容#xff0c;请看标签#xff1a;MATLAB、聚类前提#xff1a;数据的真实标签已知#xff01;1. 归一化互信息(Normalized Mutual information)定义程序functio…MATLAB聚类有效性评价指标(外部)作者凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/更多内容请看标签MATLAB、聚类前提数据的真实标签已知1. 归一化互信息(Normalized Mutual information)定义程序function MIhat nmi(A, B)%NMI Normalized mutual information% A, B: 1*N;if length(A) ~ length(B)error(length( A ) must length( B));endN length(A);A_id unique(A);K_A length(A_id);B_id unique(B);K_B length(B_id);% Mutual informationA_occur double (repmat( A, K_A, 1) repmat( A_id, 1, N ));B_occur double (repmat( B, K_B, 1) repmat( B_id, 1, N ));AB_occur A_occur * B_occur;P_A sum(A_occur) / N;P_B sum(B_occur) / N;P_AB AB_occur / N;MImatrix P_AB .* log(P_AB ./(P_A * P_B)eps);MI sum(MImatrix(:));% EntropiesH_A -sum(P_A .* log(P_A eps),2);H_B -sum(P_B .* log(P_B eps),2);%Normalized Mutual informationMIhat MI / sqrt(H_A*H_B);结果 A [1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3]; B [1 2 1 1 1 1 1 2 2 2 2 3 1 1 3 3 3]; MIhat nmi(A, B)MIhat 0.36462. Rand统计量(Rand index)定义程序function [AR,RI,MI,HI]RandIndex(c1,c2)%RANDINDEX - calculates Rand Indices to compare two partitions% ARIRANDINDEX(c1,c2), where c1,c2 are vectors listing the% class membership, returns the Hubert Arabie adjusted Rand index.% [AR,RI,MI,HI]RANDINDEX(c1,c2) returns the adjusted Rand index,% the unadjusted Rand index, Mirkins index and Huberts index.if nargin 2 || min(size(c1)) 1 || min(size(c2)) 1error(RandIndex: Requires two vector arguments)returnendCContingency(c1,c2);%form contingency matrixnsum(sum(C));nissum(sum(C,2).^2);%sum of squares of sums of rowsnjssum(sum(C,1).^2);%sum of squares of sums of columnst1nchoosek(n,2);%total number of pairs of entitiest2sum(sum(C.^2));%sum over rows columnns of nij^2t3.5*(nisnjs);%Expected index (for adjustment)nc(n*(n^21)-(n1)*nis-(n1)*njs2*(nis*njs)/n)/(2*(n-1));At1t2-t3;%no. agreementsD -t2t3;%no. disagreementsif t1ncAR0;%avoid division by zero; if k1, define Rand 0elseAR(A-nc)/(t1-nc);%adjusted Rand - Hubert Arabie 1985endRIA/t1;%Rand 1971%Probability of agreementMID/t1;%Mirkin 1970%p(disagreement)HI(A-D)/t1;%Hubert 1977%p(agree)-p(disagree)function ContContingency(Mem1,Mem2)if nargin 2 || min(size(Mem1)) 1 || min(size(Mem2)) 1error(Contingency: Requires two vector arguments)returnendContzeros(max(Mem1),max(Mem2));for i 1:length(Mem1)Cont(Mem1(i),Mem2(i))Cont(Mem1(i),Mem2(i))1;end程序中包含了四种聚类度量方法Adjusted Rand index、Rand index、Mirkin index、Hubert index。结果 A [1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3]; B [1 2 1 1 1 1 1 2 2 2 2 3 1 1 3 3 3]; [AR,RI,MI,HI]RandIndex(A,B)AR 0.2429RI 0.6765MI 0.3235HI 0.35293. 参考文献(simple) Tool for estimating the number of clustersMutual information and Normalized Mutual information 互信息和标准化互信息Evaluation of clustering
http://www.yutouwan.com/news/395049/

相关文章:

  • 盐城市建设局网站物业资质胶州人才网
  • 怎么做淘宝联盟的推广网站顺的网站建设案例
  • 怎样查网站和增加网站汉中建设工程招投标网
  • vscode 网站开发教程百度找不到 网站
  • 淘宝刷单网站开发网上商城 网站
  • 网站关键字优化简介东莞网络推广代理
  • 食品销售公司网站制作深圳企业建站程序
  • 邯郸建设局网站网站建设实务课本
  • php做网站不兼容ie8佛山专业做网站的
  • 完整网站开发需要多久免费看电视剧网站2020
  • 论坛网站模板深圳公司注册的服务机构
  • 东莞设计网站服务的公司销售网站建设的短文
  • 网站合作客户网页设计与制作免费模板
  • 重庆专业网站推广流程任县建设局网站
  • 做网站接私活网站建设有哪几种形式
  • 自己做的网站怎么上传网站开发项目预算表
  • 集团网站策划方案青云 wordpress
  • 网站登陆模板下载网站备案 取消接入
  • 网站建设及维护 东营做电商网站要服务器吗
  • 江苏中星建设集团网站新品发布会致辞稿
  • 有网站源码去哪里做全屋家具定制价格表
  • 石家庄做标书的网站小程序免费制作平台360
  • 国内规模大的建站公司牡丹江宣传网
  • 小昆山网站建设免费网站生成软件
  • 流行网站设计手机app免费下载
  • 简单的阿里云建设网站网站开发交付清单
  • 金华网站建设设计做企业官网需要什么条件
  • 网站开发png图标素材海淀网站建设多少钱
  • 58同城做网站的电话网站顶部滑动展示的div层提示效果
  • 常德建设公司网站百度免费安装下载