集成在PlatEMOv2.9上的PSP代码

PSP(Pareto Sets Proximity)反映了得到的PSs与真实PSs之间的相似性

P S P = C R I G D X PSP=\frac{CR}{IGDX} PSP=IGDXCR

其中 C R CR CR为覆盖率, I G D X IGDX IGDX为决策空间的反转世代距离。

CR公式如下:
( ∏ i = 0 n σ l ) 1 / 2 n \left(\prod \limits_{i=0}^n\sigma_l\right)^{1/2n} (i=0nσl)1/2n

  • 其中 σ l \sigma_l σl 如下:
    σ l { 1 V l m a x = V l m i n 0 v l m i n ≥ V l m a x ∣ ∣ v l m a x ≤ V l m i n ( m i n ( v l m a x , V l m a x ) − m a x ( v l m i n , V l m i n ) V l m a x − V l m a x ) 2 o t h e r w i s e \sigma_l \begin{cases} 1 &V_l^{max}=V_l^{min}\\ 0 &v_l^{min}\ge V_l^{max}\left|\right|v_l^{max}\le V_l^{min}\\ \left(\frac{min(v_l^{max},V_l^{max})-max(v_l^{min},V_l^{min})}{V_l^{max}-V_l^{max}} \right)^2 & otherwise \end{cases} σl10(VlmaxVlmaxmin(vlmax,Vlmax)max(vlmin,Vlmin))2Vlmax=VlminvlminVlmaxvlmaxVlminotherwise
    在这个式中式中 n n n为决策空间的维数; v l m a x v_l^{max} vlmax v l m i n v_l^{min} vlmin分别为第 l l l个变量得到的 P S PS PS的最大值和最小值; V l m a x V_l^{max} Vlmax V l m i n V_l^{min} Vlmin是第 l l l个变量的真 P S PS PS的最大值和最小值。

PSP不仅能反映得到PS的收敛性,还能表示真PS与得到PS的重叠率。更大的PSP值是可取的。

下面是matlab代码

function Score=PSP(Parameter)
% <metric> <max>
% PSP: Calculate the Pareto Sets Proximity
%% Input:
%                              Dimension                                                                    Description
%      obtained_ps     population_size x n_var                                                 Obtained Pareto set     
%      reference_ps    num_of_solutions_in_reference_ps x n_var                     Reference Pareto set
%      fname——the type of the test problem

%% Output:
%                           Description
%      Score             Pareto Sets Proximity
    IGDX_Score = IGDX(Parameter);
    CR_Score = CR_calculation(Parameter);
    Score = CR_Score / IGDX_Score;
end
function CR_Score=CR_calculation(Parameter)
% CR_calculation: Calculate the cover rate of the obtained Pareto set

% Dimension: n_var --- dimensions of decision space

%% Input:
%                              Dimension                                                                    Description
%      PopDec     population_size x n_var                                                 Obtained Pareto set     
%      PS    num_of_solutions_in_reference_ps x n_var                     Reference Pareto set

%% Output:
%                       Description
%      CR             Cover rate of the obtained Pareto set
[~,~,PopDec,PS,fname,~] = deal(Parameter{:});
n_var=size(PS,2);
%find the maximum and minimum in each dimension of obtained Pareto set
obtained_min=min(PopDec);
obtained_max=max(PopDec);
%find the maximum and minimum in each dimension of reference Pareto set
reference_min=min(PS);
reference_max=max(PS);
for i=1:n_var
    if reference_max(i)==reference_min(i)||(strcmp(fname,'MMF9')&&i==2)||(strcmp(fname,'MMF10')&&i==2)...
            ||(strcmp(fname,'MMF11')&&i==2)||(strcmp(fname,'MMF12')&&i==2)||(strcmp(fname,'MMF20')&&i==2)||(strcmp(fname,'MMF14')&&i==3)||(strcmp(fname,'MMF15')&&i==3)
        kesi(i)=1;% if the i_th value of reference Pareto set are all the same, ignore the i_th dimension.
    elseif obtained_min(i)>=reference_max(i)||reference_min(i)>=obtained_max(i)
         kesi(i)=0;
    else
        kesi(i)=((min(obtained_max(i),reference_max(i))-max(obtained_min(i),reference_min(i)))/...
        (reference_max(i)-reference_min(i)))^2;
    end
end
CR_Score=nthroot(prod(kesi),2*n_var);
end
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值