Home > Mateda2.0 > knowledge_extraction > Pareto-approximations > ComputeSchottsSpacingMetric.m

ComputeSchottsSpacingMetric

PURPOSE ^

[Val] = ComputeSchottsSpacingMetric(Pop)

SYNOPSIS ^

function[Val] = ComputeSchottsSpacingMetric(Pop)

DESCRIPTION ^

 [Val] = ComputeSchottsSpacingMetric(Pop) 
 ComputeSchottsSpacingMetric: Computes the Schotts Spacing Metric for a
 Pareto set approximation
 INPUTS
 Pop: Each row corresponds to a vector
 OUTPUTS
 Val: Average square difference between pairs of vectors

 Last version 2/26/2009. Roberto Santana (roberto.santana@ehu.es)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function[Val] = ComputeSchottsSpacingMetric(Pop) 
0002 % [Val] = ComputeSchottsSpacingMetric(Pop)
0003 % ComputeSchottsSpacingMetric: Computes the Schotts Spacing Metric for a
0004 % Pareto set approximation
0005 % INPUTS
0006 % Pop: Each row corresponds to a vector
0007 % OUTPUTS
0008 % Val: Average square difference between pairs of vectors
0009 %
0010 % Last version 2/26/2009. Roberto Santana (roberto.santana@ehu.es)
0011 
0012  Val = 0;
0013  [PopSize,n] = size(Pop);
0014  di = n*max(max(Pop))*ones(1,PopSize);
0015  npairs = PopSize*(PopSize-1)/2;
0016  for i=1:PopSize,
0017   for j=1:PopSize,
0018     if i~=j
0019       di(i) = min(di(i),sum(abs(Pop(i,:)-Pop(j,:))));
0020     end
0021   end
0022  end
0023  d = mean(di);
0024  
0025  Val = sqrt((1/(PopSize-1))*sum( (di-d).^2));
0026  
0027

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