文件名称:tenlei
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:3.3kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
function [U,center,result,w,obj_fcn]= fenlei(data)
[data_n,in_n] = size(data)
m= 2 % Exponent for U
max_iter = 100 % Max. iteration
min_impro =1e-5 % Min. improvement
c=3
[center, U, obj_fcn] = fcm(data, c)
for i=1:max_iter
if F(U)>0.98
break
else
w_new=eye(in_n,in_n)
center1=sum(center)/c
a=center1(1)./center1
deta=center-center1(ones(c,1),:)
w=sqrt(sum(deta.^2)).*a
for j=1:in_n
w_new(j,j)=w(j)
end
data1=data*w_new
[center, U, obj_fcn] = fcm(data1, c)
center=center./w(ones(c,1),:)
obj_fcn=obj_fcn/sum(w.^2)
end
end
display(i)
result=zeros(1,data_n) U_=max(U)
for i=1:data_n
for j=1:c
if U(j,i)==U_(i)
result(i)=j continue
end
end
end -function [U, center, result, w, obj_fcn] = fenlei (data) [data_n, in_n] = size (data) m = 2 Exponent for U max_iter = 100 Max. iteration min_impro = 1e-5 Min. improvement c = 3 [center, U, obj_fcn] = fcm (data, c) for i = 1: max_iter if F (U)> 0.98 break else w_new = eye (in_n, in_n) center1 = sum (center)/ca = center1 (1) ./center1 deta = center-center1 (ones (c, 1),:) w = sqrt (sum (deta. ^ 2)) .* a for j = 1: in_n w_new (j, j) = w (j) end data1 = data* w_new [center, U, obj_fcn] = fcm (data1, c) center = center./w (ones (c, 1),:) obj_fcn = obj_fcn/sum (w. ^ 2) end end display (i) result = zeros (1, data_n) U_ = max (U) for i = 1: data_n for j = 1: c if U (j, i) == U_ (i) result (i) = j continue end end end
[data_n,in_n] = size(data)
m= 2 % Exponent for U
max_iter = 100 % Max. iteration
min_impro =1e-5 % Min. improvement
c=3
[center, U, obj_fcn] = fcm(data, c)
for i=1:max_iter
if F(U)>0.98
break
else
w_new=eye(in_n,in_n)
center1=sum(center)/c
a=center1(1)./center1
deta=center-center1(ones(c,1),:)
w=sqrt(sum(deta.^2)).*a
for j=1:in_n
w_new(j,j)=w(j)
end
data1=data*w_new
[center, U, obj_fcn] = fcm(data1, c)
center=center./w(ones(c,1),:)
obj_fcn=obj_fcn/sum(w.^2)
end
end
display(i)
result=zeros(1,data_n) U_=max(U)
for i=1:data_n
for j=1:c
if U(j,i)==U_(i)
result(i)=j continue
end
end
end -function [U, center, result, w, obj_fcn] = fenlei (data) [data_n, in_n] = size (data) m = 2 Exponent for U max_iter = 100 Max. iteration min_impro = 1e-5 Min. improvement c = 3 [center, U, obj_fcn] = fcm (data, c) for i = 1: max_iter if F (U)> 0.98 break else w_new = eye (in_n, in_n) center1 = sum (center)/ca = center1 (1) ./center1 deta = center-center1 (ones (c, 1),:) w = sqrt (sum (deta. ^ 2)) .* a for j = 1: in_n w_new (j, j) = w (j) end data1 = data* w_new [center, U, obj_fcn] = fcm (data1, c) center = center./w (ones (c, 1),:) obj_fcn = obj_fcn/sum (w. ^ 2) end end display (i) result = zeros (1, data_n) U_ = max (U) for i = 1: data_n for j = 1: c if U (j, i) == U_ (i) result (i) = j continue end end end
相关搜索: FCM
(系统自动生成,下载前可以参看下载内容)
下载文件列表
fenlei.m
ft(3).doc
ft(3).doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.