Skip to content

How to handle NaN? #18

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

Closed
basnijholt opened this issue Dec 19, 2018 · 3 comments
Closed

How to handle NaN? #18

basnijholt opened this issue Dec 19, 2018 · 3 comments

Comments

@basnijholt
Copy link
Member

(original issue on GitLab)

opened by Jorn Hoofwijk (@Jorn) at 2018-10-29T11:13:53.243Z

Suppose some function returns NaN for some input value, how should this be handled?

I think the user should at least be warned that the function is ill-behaved.

Then we could still continue learning the function but then ignoring this point for any further evaluation, so we then more or less keep those points in the pending points indefinitely, which could slow down the learner a lot if there are many points that return NaN.

Or we could simply raise an exception and terminate the runner. Which could be inconvenient if you let it run overnight and find in the morning that your learner stopped.

@basnijholt
Copy link
Member Author

originally posted by Bas Nijholt (@basnijholt) at 2018-10-29T11:16:27.414Z on GitLab

The Learner1D and Learner2D currently handle NaNs, I implemented it at some point (also I am currently using this feature in a project.)

It's not tested and I don't remember exactly what happens there, but I guess it is easy to figure that out.

@basnijholt
Copy link
Member Author

originally posted by Jorn Hoofwijk (@Jorn) at 2018-10-29T11:22:05.044Z on GitLab

ohw okay, in that case I should close this right?

@basnijholt
Copy link
Member Author

originally posted by Bas Nijholt (@basnijholt) at 2018-10-29T11:22:39.353Z on GitLab

I think it should be tested though to make clear what should happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant