?? yf_pcmc1_step.m
字號:
function [V, T, E] = Yf_PCMC1_Step(X, V, w, c, m)
%Yf_PCMC1_Step One step in PCM clustering.
%
% See Yf_PCMC1.m
%
% Mahdi Amiri, June 17, 2003
% http://yashil.20m.com/
n = size(X, 1);
p = size(X, 2);
% Fill the distance matrix
dist = Yf_EuDistArrayOfVectors1 (V, X);
% Claculate new T
w = w(:);
tmp = (dist .^ 2) ./ ( w * ones (1, n));
tmp = tmp.^(1/(m-1));
T = 1 ./ (1 + tmp);
% For the situation of "singularity" (one of the data points is
% exactly the same as one of the cluster centers) T will be one.
V_old = V;
mf = T.^m; % MF matrix after exponential modification
V = mf*X./((ones(p, 1)*sum(mf'))'); % new center
E = norm (V - V_old, 1);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -