Skip to content

Commit 34d37f7

Browse files
committed
split up aloss and rloss
1 parent 4e34aba commit 34d37f7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adaptive/learner/average_learner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ def loss(self, real=True, *, n=None):
118118
if n < self.min_npoints:
119119
return np.inf
120120
standard_error = self.std / sqrt(n)
121-
return max(
122-
standard_error / self.atol, standard_error / abs(self.mean) / self.rtol
123-
)
121+
aloss = standard_error / self.atol
122+
rloss = standard_error / abs(self.mean) / self.rtol
123+
return max(aloss, rloss)
124124

125125
def _loss_improvement(self, n):
126126
loss = self.loss()

0 commit comments

Comments
 (0)