⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yf_pcmc1_step.m

📁 模糊C均值聚类的一个参考材料,做模糊聚类是用的一个程序
💻 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 + -