Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simplified logic
Browse files Browse the repository at this point in the history
RabiyaF committed Nov 5, 2024
1 parent 9057387 commit a94e034
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions fitbenchmarking/utils/fitbm_result.py
Original file line number Diff line number Diff line change
@@ -356,15 +356,13 @@ def norm_acc(self):
if self._norm_acc is None:
if self.min_accuracy in [np.nan, np.inf]:
self._norm_acc = np.inf
elif self.min_accuracy in [0.0, 0]:
LOGGER.warning("The min accuracy of the dataset is 0. "
"The relative performance will be "
"approximated using a min of 1e-10.")
self._norm_acc = self.accuracy / 1e-10
else:
if self.min_accuracy in [0.0, 0]:
LOGGER.warning("The min accuracy of the dataset is 0. "
"The relative performance will be "
"approximated using a min of 1e-10.")
best = 1e-10
else:
best = self.min_accuracy
self._norm_acc = self.accuracy / best
self._norm_acc = self.accuracy / self.min_accuracy
return self._norm_acc

@norm_acc.setter

0 comments on commit a94e034

Please sign in to comment.