We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opened by Bas Nijholt (@basnijholt) at 2018-09-14T11:16:49.789Z
l = adaptive.Learner1D(lambda x: x, (0, 1)) l.tell_many([1, 0, 0.5], [0, 0, 0]) l.ask(1)
Traceback
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-17-1b520d635f37> in <module>() 2 l = adaptive.Learner1D(lambda x: x, (0, 1)) 3 l.tell_many([1, 0, 0.5], [0, 0, 0]) ----> 4 l.ask(1) ~/Work/adaptive/adaptive/learner/learner1D.py in ask(self, n, add_data) 301 in self.neighbors.items()][:-1] 302 --> 303 for x_left, x_right in intervals: 304 self.losses[x_left, x_right] = ( 305 self.loss_per_interval((x_left, x_right), self._scale, self.data) ~/Work/adaptive/adaptive/learner/base_learner.py in tell_many(self, xs, ys) 43 """ 44 for x, y in zip(xs, ys): ---> 45 self.tell(x, y) 46 47 @abc.abstractmethod ~/Work/adaptive/adaptive/learner/learner1D.py in tell(self, x, y) 239 self.update_scale(x, y) 240 --> 241 # Update the losses 242 self.update_losses(x, real) 243 ~/Work/adaptive/adaptive/learner/learner1D.py in update_losses(self, x, real) 159 a, b = self.find_neighbors(x, self.neighbors_combined) 160 if x_left is not None and x_right is not None: --> 161 dx = x_right - x_left 162 loss = self.losses[x_left, x_right] 163 losses_combined[a, x] = (x - a) * loss / dx KeyError: (0, 1)
The text was updated successfully, but these errors were encountered:
originally posted by Bas Nijholt (@basnijholt) at 2018-09-14T11:21:51.304Z on GitLab
This is probably related to gitlab:#97.
Sorry, something went wrong.
No branches or pull requests
(original issue on GitLab)
opened by Bas Nijholt (@basnijholt) at 2018-09-14T11:16:49.789Z
Traceback
The text was updated successfully, but these errors were encountered: