# How to calculate Hypervolume Indicator for Negative Objective Values on Pareto Front

조회 수: 21 (최근 30일)
Wei Wen 2023년 12월 15일
댓글: Wei Wen 2023년 12월 21일
Good day.
I'm currently working on a two-objective multiobjective algorithm. I need assistance in calculating the hypervolume indicator between the estimated Pareto front (P) and a reference point (R). Despite checking certain Matlab files, such as
1. Yi Cao (2023). Hypervolume Indicator (https://www.mathworks.com/matlabcentral/fileexchange/19651-hypervolume-indicator), MATLAB Central File Exchange. Retrieved December 15, 2023.
2. Bahman Ahmadi (2023). C-index, spacing, and hypervolume (https://www.mathworks.com/matlabcentral/fileexchange/125980-c-index-spacing-and-hypervolume), MATLAB Central File Exchange. Retrieved December 15, 2023.
it seems they only support cases where the objective function values on the Pareto front are strictly positive.
When I tested with benchmark functions like Kursawe (which has negative objectives function values on both sides), the hypervolume results appeared incorrect. Are there any solutions or code available for calculating the hypervolume when objective function values are negative?"

댓글을 달려면 로그인하십시오.

### 답변 (1개)

Gowtham 2023년 12월 20일
편집: Gowtham 2023년 12월 20일
Hello,
I understand that you are working on a two-objective multi-objective optimization algorithm and facing issue when the objective function values on the Pareto front are negative.
I tried to reproduce the issue at my end and found out a workaround to resolve it. This can be achieved by normalization and shifting the Pareto front approximation (P) and the reference point (R).
To resolve this issue, I suggest you add the following code snippet after input and output validation at line 27 in the function definition of ‘hypervolume’ (Hypervolume Indicator) from File Exchange.
error(nargoutchk(0,1,nargout));
% ---
lower_bound = min(P);
P = P - lower_bound;
r = r - lower_bound;
% ---
P=P*diag(1./r);
Please find the attachment of the updated function definition of 'hypervolume'.
For a sample demonstration of the above process, kindly refer to the following code snippet:
% number of points in P
num_points = 3;
% dimension of the points in P
dim = 3;
% generate random points in P (negative if possible)
P = (rand(num_points, dim) - 0.5) * 10;
% generate a reference point R that is
% greater than the max of P in each dimension
r = max(P, [], 1) + rand(1, dim) * 2;
% number of random points to estimate
N = 5;
% call the hypervolume function with the generated values
v = hypervolume(P, r, N);
disp(v);
0.6000
Kindly refer to the following MATLAB Documentation(s) for further information on how to use the mentioned functions:
Hope this helps.
Best Regards,
Gowtham
##### 댓글 수: 3이전 댓글 1개 표시이전 댓글 1개 숨기기
Gowtham 2023년 12월 20일
In this case, N represents the number of random points to generate within the bounded hyper-cuboid defined by the reference point r. These random points are used to estimate the hypervolume that is dominated by the Pareto front approximation P.
The selection of an appropriate value for N may be influenced by various factors, including the dimensionality (d) and the desired level of accuracy. While the default value for N is set to 1000, it is worth noting that this parameter can be adjusted iteratively to refine the performance and precision of the results.
Wei Wen 2023년 12월 21일
Thank you !

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 Multiobjective Optimization에 대해 자세히 알아보기

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by