Code covered by the BSD License

### Highlights from Hypervolume Computation

4.0
4.0 | 1 rating Rate this file 9 Downloads (last 30 days) File Size: 10.5 KB File ID: #30785 Version: 1.1

# Hypervolume Computation

by

### Johannes (view profile)

17 Mar 2011 (Updated )

Scripts for computing the hypervolume and related stuff.

File Information
Description

Serves as a first attempt to get publicly available MATLAB code for computing the hypervolume and hypervolume contributions. The implementation is usable in 2D and 3D. For 4D and beyond, it is not so efficient, but it does produce correct results. Contributions are very welcome. The code is also available and maintained in the RODEOlib sourceforge project.

MATLAB release MATLAB 7.6 (R2008a)
05 Feb 2015 samson saju

### samson saju (view profile)

when i ran the function
generate_hv_testset(M, l, testno)

it is giving an error message stating an error in
x = lhsu(M, zeros(M,1), ones(M,1))';

where is this function defined
lhsu(M, zeros(M,1), ones(M,1))'

Comment only
01 Aug 2013 Esmarie Scholtz

### Esmarie Scholtz (view profile)

I suggest changing lebesgue_2D to this:

function [lm] = lebesgue_2D(F, ub)
% Efficient method for 2D objective function values
L = sortrows(F',1)';
l = length(L(1,:));
orig=ub(2);
lm = 0;
for i = 1:l
lm = lm + (min((L(1,i) - ub(1)),0) * min((L(2,i) - ub(2)),0));
if L(2,i)<=orig
ub(2) = L(2,i);
end
end
end

Please let me know if there is something fundamentally wrong with my change.

Comment only
01 Aug 2013 Esmarie Scholtz

### Esmarie Scholtz (view profile)

Hi Johannes

I was using your Lebesgue measure for comparing a few algorithm, but when very few (less than 10) points fall below the reference point, the algorithm produces a negative value. Originally I thought the negative values might happen when no points fall below the reference points and that I could simply replace the negative values with zeroes, but that does not seem to be the case.

Comment only
04 Jul 2013 Esmond

### Esmond (view profile)

Thanks Johannes, I was just logging in to say the same thing - I figured it out for myself! Thanks for the code, very helpful.

Comment only
04 Jul 2013 Johannes

### Johannes (view profile)

Hi Esmond,

Your workaround is not really one that I would use. Rather, you should make sure that you use that same upper bound reference point during the optimization. This way, the hypervolume will always increase.

Comment only
28 Jun 2013 Esmond

### Esmond (view profile)

Hi Johannes.

Thanks for this file, very useful. I have one small problem with it though. I'm using the Lebesgue measure to track the progress of an 2-objective optimisation problem (both objectives are to be minimised). The idea being that if the hypervolume is increasing then the pareto front must be improving. But sometimes the Pareto front can become shorter, because new Pareto points dominate ones that were previously at the upper bound of each objective, and when this happens the hypervolume decreases. So in this case the pareto front is improving (because the new points dominate the old points) but the hypervolume is going down.

I can get around this problem by including the two solutions, from the full set of solutions, that have, respectively, the maximum value for each objective. These solutions are often not on the pareto front (since there are other designs that have a lower value for one or both objectives), so that breaks the rule in your Lebesgue measure that all solutions of F should be non-dominated. Should I worry about this?

Es Tresidder

Comment only
08 Dec 2011 Jose

### Jose (view profile)

Now it works perfectly,
Thanks

Comment only
08 Dec 2011 Johannes

### Johannes (view profile)

Hi Jose,

It seems you have found a small bug. Change at line 106 b to ub and it should be fine. I updated the file in this file-exchange (takes a few hours to update, though).

Comment only
06 Dec 2011 Jose

### Jose (view profile)

Hi Johannes,

The code works really good when the reference point is the default one (faster and more accurate than the Monte-Carlo approximation)

However, for more than 2 objectives, the result for lebesgue_measure.m and for approximate_hypervolume_ms.m are different unless the reference point is the boundary point containing the maximum of F for each objective (the so-called default ub point).

Am I wrong? Could you give me some feedback?
Thanks,