Skip to content

Commit

Permalink
Update quality_indicator.py
Browse files Browse the repository at this point in the history
modify some details
  • Loading branch information
Maomao2molly committed Feb 12, 2024
1 parent ca39b42 commit c7787cd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions desdeo_tools/utilities/quality_indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import numpy as np
import hvwfg as hv
from desdeo_tools.utilities.fast_non_dominated_sorting import dominates, fast_non_dominated_sort_indices
from desdeo_tools.utilities.quality_indicator import hypervolume_indicator

from desdeo_tools.scalarization import SimpleASF

Expand Down Expand Up @@ -138,7 +137,7 @@ def RP_dom_cal(self, set_of_s, RP, doms, nadir):
if all_phv == 0:
return 0, 0, 0
else:
return 1 + (pos_phv / max_phv), (pos_phv + rp_phv) / max_phv, neg_phv / max_phv, rp_phv / max_phv
return 1 + (pos_phv / all_phv), (pos_phv + rp_phv) / max_phv, neg_phv / max_phv, rp_phv / max_phv

def RP_nondom_cal(self, set_of_s, RP, nadir):
"""Calculate various hypervolume metrics when RP is not dominated."""
Expand Down

0 comments on commit c7787cd

Please sign in to comment.