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

📄 calfitness.m

📁 将PSO和LBG结合在一步迭代过程中
💻 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
%==========================================================================

fitness(:,IndexIteration)=0;
for i=1:num_particle
    tempz_cluster=reshape(particle(i,:,IndexIteration),D,num_cluster)';
    for j=1:num_trainingvector 
        [C,I]=min(sum((repmat(trainingvector(j,:),num_cluster,1)-tempz_cluster).^2,2));
        fitness(i,IndexIteration)=fitness(i,IndexIteration)+C;
    end
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -