[S] = Amount_of_selection(AllFunVals,AllSelFunVals) Response_to_selection: Computes the amount of selection for every objective $S(t) = \bar{f}_{s}(t) -\bar{f}(t+1)$. INPUT AllFunVals{maxgen} = FunVals(PopSize,n_objectives): Cell array that stores the evaluations of all the objectives for all the individuals in every generation AllSelFunVals{maxgen} = FunVals(PopSize,n_objectives): Cell array that stores the evaluations of all the objectives for the selected individuals in every generation OUTPUT S: Amount of selection at each generation k>1 Example: for i=1:ngen, auxr{1,i} = Cache{4,i}; auxs{1,i} = Cache{5,i}; end, [S] = Amount_of_selection(auxr,auxs) Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
0001 function[S] = Amount_of_selection(AllFunVals,AllSelFunVals) 0002 % [S] = Amount_of_selection(AllFunVals,AllSelFunVals) 0003 % Response_to_selection: Computes the amount of selection for every 0004 % objective $S(t) = \bar{f}_{s}(t) -\bar{f}(t+1)$. 0005 % 0006 % INPUT 0007 % AllFunVals{maxgen} = FunVals(PopSize,n_objectives): Cell array that stores the evaluations of all the objectives 0008 % for all the individuals in every generation 0009 % AllSelFunVals{maxgen} = FunVals(PopSize,n_objectives): Cell array that stores the evaluations of all the objectives 0010 % for the selected individuals in every generation 0011 % OUTPUT 0012 % S: Amount of selection at each generation k>1 0013 % Example: 0014 % for i=1:ngen, auxr{1,i} = Cache{4,i}; auxs{1,i} = Cache{5,i}; end, 0015 % [S] = Amount_of_selection(auxr,auxs) 0016 % 0017 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es) 0018 0019 k = size(AllFunVals,2); % Number of generations 0020 n_objectives = size(AllFunVals{1},2); % Number of objectives 0021 PopSize = size(AllFunVals{1},1); % Population size 0022 0023 for i=2:k, 0024 S{i} = mean(AllFunVals{i}) - mean(AllSelFunVals{i-1}); 0025 end