Skip to content

pymoo/hv-reference-point

Rule hv-reference-point
Pack pymoo
Severity error
Fix none, edit by hand
Library versions pymoo 0.6 and later

A reference point at the largest value of each objective gives no volume to the solutions that hold those values, so the hypervolume is too low. Use one fixed reference point for every run.

hv = HV(ref_point=res.F.max(axis=0))(res.F)
hv = HV(ref_point=np.array([1.1, 1.1]))(res.F)

The rule reports ref_point=F.max(axis=0) and ref_point=np.max(F, axis=0) on HV and Hypervolume, and HV() with no argument, which raises AssertionError, "For Hypervolume a reference point needs to be provided!". A reference point at the largest value of each objective lies on the solutions that hold the largest values, so they add no volume.

Reference point Hypervolume of three solutions Of the two extreme solutions alone
F.max(axis=0) 0.09 0.0
the fixed point (1, 1) 0.37 not run

The severity is warning for a reference point taken from the solutions, error for none. xpd has no automatic fix, so make the change by hand.

xpd prints this message with the issue. A name that starts with $ stands for code from your file.

A reference point at the largest value of each objective gives no volume to the solutions that hold those values. Two extreme solutions alone scored 0.0, and three solutions scored 0.09 where the fixed point (1, 1) gave 0.37. Use one fixed point that is worse than every solution in every objective, and keep it for every run you compare.

Browse the other rules of the pymoo pack.