Home > Mateda2.0 > selection > truncation_selection.m

truncation_selection

PURPOSE ^

[SelPop,SelFunVal]=truncation_selection(Pop,FunVal,selection_params)

SYNOPSIS ^

function[SelPop,SelFunVal]=truncation_selection(Pop,FunVal,selection_params)

DESCRIPTION ^

 [SelPop,SelFunVal]=truncation_selection(Pop,FunVal,selection_params)
 truncation_selection:        Truncation selection
                              Individuals are ordered according the given
                              ordering criterion and then, the best T*PopSize are selected.
 INPUTS 
 Pop:                 Original population
 FunVal:              A matrix of function evaluations, one vector of m objectives for each individual
 selection_params{1}: Truncation parameter T \in (0,1)
 OUTPUTS
 SelPop: Selected population
 SelFunVal:  A vector of function evaluations for each selected individual

 Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function[SelPop,SelFunVal]=truncation_selection(Pop,FunVal,selection_params)
0002 % [SelPop,SelFunVal]=truncation_selection(Pop,FunVal,selection_params)
0003 % truncation_selection:        Truncation selection
0004 %                              Individuals are ordered according the given
0005 %                              ordering criterion and then, the best T*PopSize are selected.
0006 % INPUTS
0007 % Pop:                 Original population
0008 % FunVal:              A matrix of function evaluations, one vector of m objectives for each individual
0009 % selection_params{1}: Truncation parameter T \in (0,1)
0010 % OUTPUTS
0011 % SelPop: Selected population
0012 % SelFunVal:  A vector of function evaluations for each selected individual
0013 %
0014 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
0015 
0016    PopSize = size(Pop,1);
0017    
0018    T = cell2num(selection_params{1}(1));   % The parameter used by truncation selection is the truncation parameter
0019    ordering_criterion =  char(cellstr(selection_params{1}(2)));
0020    number_objectives = size(FunVal,2);
0021    SelPopSize = floor(T*PopSize);
0022    
0023    
0024    Index = eval([ordering_criterion,'(Pop,FunVal)']);   
0025    SelPop = Pop(Index(1:SelPopSize),:);  
0026    SelFunVal = FunVal(Index(1:SelPopSize),:); 
0027   
0028    return
0029  
0030    
0031    
0032

Generated on Fri 04-Dec-2009 13:38:29 by m2html © 2003