资源简介
FCM模糊局问题,自带数据
文件:clust_denormalize.m;clust_normalize.m;clusteval.m;FCMclust.m;FuzSam.m等
代码片段和文件信息
function eval = clusteval(newresultparam)
v = result.cluster.v;
c = size(result.cluster.v1);%c = param.c;
if exist(‘param.m‘)==1 m = param.m;else m = 2;end;
X=new.X;
[Nn] = size(X);
X1 = ones(N1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if isfield(result.cluster‘M‘)%GK
M = result.cluster.M;
for j = 1 : c
xv = X - X1*v(j:);
d(:j) = sum((xv*M(::j).*xv)2);
end
distout=sqrt(d);
%Update the partition matrix
d = (d+1e-10).^(-1/(m-1));
f0 = (d ./ (sum(d2)*ones(1c)));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
elseif isfield(result.cluster‘P‘)%GG
A = result.cluster.P;
f = result.data.f;
fm = f.^m;
for j = 1 : c
xv = X - X1*v(j:);
Pi(::j)=1/N*sum(fm(:j));
A = result.cluster.P(::j);
d(:j) = 1/(det(pinv(A))^(1/2))*1/Pi(::j)*exp(1/2*sum((xv*pinv(A).*xv)2));
end
distout=sqrt(d);
%Update the partition matrix
if m>1
d = (d+1e-10).^(-1/(m-1));
else
d = (d+1e-10).^(-1);
end
f0 = (d ./ (sum(d2)*ones(1c)));
else %FCM
for j = 1 : c
xv = X - X1*v(j:);
d(:j) = sum((xv*eye(n).*xv)2);
end;
distout=sqrt(d);
d = (d+1e-10).^(-1/(m-1));
f0 = (d ./ (sum(d2)*ones(1c)));
end
%results
eval.d = distout;
eval.f = f0;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Visualization
if n == 2 %in 2dimensional case draw a contour map
lower1=min(X(:1));upper1=max(X(:1));scale1=(upper1-lower1)/200;
lower2=min(X(:2));upper2=max(X(:2));scale2=(upper2-lower2)/200;
[xy] = meshgrid(lower1:scale1:upper1 lower2:scale2:upper2);
pair = [x(:) y(:)];
[pair1pair2] = size(pair);
X1 = ones(pair11);
d=zeros(pair1c); %resize the distance matrix
if isfield(result.cluster‘M‘)%GK
for j = 1 : c
xv = pair - X1*v(j:);
d(:j) = sum((xv*M(::j).*xv)2);
end
distout=sqrt(d);
d = (d+1e-10).^(-1/(m-1));
f0 = (d ./ (sum(d2)*ones(1c)));
elseif isfield(result.cluster‘P‘)%GG
for j = 1 : c
xv = pair - X1*v(j:);
Pi(::j)=1/N*sum(fm(:j));
A = result.cluster.P(::j);
d(:j) = 1/(det(pinv(A))^(1/2))*1/Pi(::j)*exp(1/2*sum((xv*pinv(A).*xv)2));
end
distout=sqrt(d);
if m>1
d = (d+1e-10).^(-1/(m-1));
else
d = (d+1e-10).^(-1);
end
f0 = (d ./ (sum(d2)*ones(1c)));
else %FCM
for i = 1 : c
xv = pair - ones(pair11)*v(i:);
d(:i)= sum((xv*eye(2).*xv)2);%
end;
distout=sqrt(d);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3178 2005-03-22 15:59 FUZZCLUST\clusteval.m
文件 710 2005-03-22 16:02 FUZZCLUST\clust_denormalize.m
文件 705 2005-03-22 16:01 FUZZCLUST\clust_normalize.m
文件 1483 2005-03-22 16:03 FUZZCLUST\FCMclust.m
文件 2441 2005-03-22 15:35 FUZZCLUST\FuzSam.m
文件 2553 2005-03-30 13:25 FUZZCLUST\GGclust.m
文件 3112 2005-03-30 13:25 FUZZCLUST\GKclust.m
文件 1957 2005-03-22 16:06 FUZZCLUST\Kmeans.m
文件 2308 2005-03-22 16:07 FUZZCLUST\Kmedoid.m
文件 379 2004-05-06 10:24 FUZZCLUST\nDexample.m
文件 1353 2004-05-10 13:36 FUZZCLUST\PCA.m
文件 1174 2005-03-22 16:10 FUZZCLUST\PROJEVAL.M
文件 4509 2005-03-22 15:19 FUZZCLUST\SAMMON.M
文件 610 2004-05-10 14:12 FUZZCLUST\SAMSTR.M
文件 4101 2004-05-13 14:49 FUZZCLUST\validity.m
目录 0 2010-11-17 19:56 FUZZCLUST
----------- --------- ---------- ----- ----
30573 16
- 上一篇:线性预测编码 Matlab
- 下一篇:用matlab给图像分块并保存子图源码
相关资源
- 模糊聚类matlab源程序代码
- 模糊聚类算法matlab
- FLICM图像分割算法
- 图像模糊C均值聚类分割matlab代码
- FCM模糊聚类matlab代码
- Genetic optimization of C clustering 运用遗传
- 基于局部信息的FLICM
- pso_fcm 基于粒子群模糊聚类算法
- 各种matlab模糊辨识算法
- FCM-vs-ESSC 模糊聚类图像分割
- FCMLSM 改进的基于整合空间的模糊聚类
- Fuzzy-clustering-image-segmentation
- kfcm
- 经典模糊聚类实现医学图像分割.m
- 模糊c均值算法
- MATLAB实现的模糊分类与模糊聚类
- FCM模糊聚类分析matlab实现
- 模糊聚类matlab程序
- 模糊聚类-matlab实现
- 基于二维直方图模糊聚类
评论
共有 条评论