-
Notifications
You must be signed in to change notification settings - Fork 58
Method 'Learner.tell' is ambiguous #80
New issue
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
Comments
originally posted by Joseph Weston (@jbweston) at 2018-05-28T12:57:26.367Z on GitLab Option 2 gives better UX, but may be difficult to do. The idea is to implement
The difficult part is implementing |
originally posted by Jorn Hoofwijk (@Jorn) at 2018-05-29T09:29:03.950Z on GitLab As we already know the dimensionality of x based on self.bounds, we could use that to determine if you are adding a single point or multiple points at once, like this (pseudocode):
Maybe somewhere we should convert the input into a numpy array if it is an iterable. (so we can call xs.shape safely) and we should check that xs and ys have the same number of entries. |
originally posted by Joseph Weston (@jbweston) at 2018-05-29T10:25:16.095Z on GitLab Unfortunately Currently subclasses should implement |
originally posted by Bas Nijholt (@basnijholt) at 2018-05-29T19:40:59.308Z on GitLab I agree, option 2 would be the best solution. |
originally posted by Anton Akhmerov (@anton-akhmerov) at 2018-07-02T13:59:40.269Z on GitLab I am actually in favor of the first solution. My reason is that:
|
originally posted by Joseph Weston (@jbweston) at 2018-07-02T17:32:20.080Z on GitLab I think that solution 2 is preferable from a UX standpoint, but will implementing it properly will require too much effort for too little UX reward. I cannot think of any actual scenario where having 2 methods would actually restrict you from doing anything. |
originally posted by Bas Nijholt (@basnijholt) at 2018-07-02T17:37:23.897Z on GitLab OK fair enough, I agree and will close gitlab:!78. |
(original issue on GitLab)
opened by Joseph Weston (@jbweston) at 2018-05-28T12:50:24.892Z
Presently
Learner.tell
decides whether it has been passed a single point, or a sequence of points by checking whether both the "x" (domain) and "y" (codomain) values are iterable. If they are, then they are treated as being a sequence of points, otherwise they are treated as a single point.This works for all the current learners because, by pure accident, we have not yet implemented learners for functions
ℝ^N → ℝ^M
. This recently had confusing consequences (see gitlab:#58).We have 2 choices:
Have 2 methods (e.g.
tell
andtell_many
) that treat the single point case and several point case respectively. This would be a pure rename of the previous (and badly named) methodsadd_point
andadd_data
.Use better logic for determining when a sequence of points is being passed, as opposed to a single point.
The text was updated successfully, but these errors were encountered: