Home > Mateda2.0 > selection > FindParetoSet.m

# FindParetoSet

## PURPOSE

[Index]=FindParetoSet(Pop,FunVal)

## SYNOPSIS

function[Index]=FindParetoSet(Pop,FunVal)

## DESCRIPTION

     [Index]=FindParetoSet(Pop,FunVal)
     FindParetoSet:       Identify the set of non-dominated solutions
     INPUTS
     Pop:                 Population
     FunVal:              A matrix of function evaluations, one vector of m objectives for each individual
     OUTPUTS
     Index: Index of non-dominated solutions in Pop

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

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

- BN_Prediction EXAMPLE 2: Evaluation of the prediction capability of the models
- ComputeC_Metric [CA,CB] = ComputeC_Metric(PopA,PopB)
- NonDominated_selection [SelPop,SelFunVal]=NonDominated_selection(Pop,FunVal,selection_params)

## SOURCE CODE

    0001 function[Index]=FindParetoSet(Pop,FunVal)
    0002 % [Index]=FindParetoSet(Pop,FunVal)
    0003 % FindParetoSet:       Identify the set of non-dominated solutions
    0004 % INPUTS
    0005 % Pop:                 Population
    0006 % FunVal:              A matrix of function evaluations, one vector of m objectives for each individual
    0007 % OUTPUTS
    0008 % Index: Index of non-dominated solutions in Pop
    0009 %
    0010 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
    0011
    0012    PopSize = size(Pop,1);
    0013    number_objectives = size(FunVal,2);
    0014
    0015    last = size(FunVal,1);  % Number of individuals in the population
    0016    DomPop = zeros(1,last); % Indicator of dominated individuals
    0017
    0018    i = 1;
    0019  while i<last,
    0020    while DomPop(i)>0 && i<last  % Find the first non-dominated individual
    0021      i = i + 1;
    0022    end,
    0023    j = i + 1;
    0024    while j<=last
    0025     while DomPop(j)>0 && j<last  % Find the second non dominated individual
    0026      j = j + 1;
    0027     end,
    0028       if(sum(FunVal(i,:)>=FunVal(j,:))==number_objectives) % j is dominated by i (they could be equal)
    0029         DomPop(j) = DomPop(j) + 1;   % j is marked as dominated
    0030       elseif(sum(FunVal(j,:)>=FunVal(i,:))==number_objectives) % i is dominated by j
    0031         DomPop(i) = DomPop(i) + 1;  % i is marked as dominated
    0032         j = last;
    0033       end,
    0034     j = j + 1;
    0035    end
    0036    i = i + 1;
    0037  end
    0038
    0039
    0040  Index = find(DomPop==0); %Non dominated solutions
    0041
    0042  return
    0043
    0044    last = size(FunVal,1);
    0045    DomPop = zeros(1,last);
    0046    for i=1:last-1
    0047     for j=i+1:last
    0048       if(sum(FunVal(i,:)>=FunVal(j,:))==number_objectives)
    0049         DomPop(j) = DomPop(j) + 1;
    0050       elseif(sum(FunVal(j,:)>=FunVal(i,:))==number_objectives)
    0051         DomPop(i) = DomPop(i) + 1;
    0052       end,
    0053     end
    0054    end
    0055    Index = find(DomPop==0); %Non dominated solutions
    0056
    0057
    0058