📄 updateparticle_lhl.m
字号:
% =====================================================================
% PP algorithm
% sub program for pp
% Start Date: 15/07/2006
% Last Changed: 21/08/2006
%
% Specification: The algorithm, proposed by Ji and Liao in 2006, incorporating
% both PSO algorithm and LBG to one iteration and using
% particle-pair to explore in the problem space
%
% Copyright (c) Ji and Liao in 2006
% All rights Reserved
%==========================================================================
for k=1:num_particle
mu=reshape(particle(k,:,IndexIteration),D,num_cluster);
[I,mu,C] = kmeans_lhl(trainingvector',256,mu);
mu=mu';
[bigD,geitv]=sort(C);
time=0;
for ttt=1:256
if isnan(mu(ttt,1))==1
time=time+1;
temptv=geitv(end-time+1);
mu(ttt,:)=trainingvector(temptv,:);
end
end
mu=mu';
particle(k,:,IndexIteration)=reshape(mu,1,D*num_cluster);
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -