Skip to content

(refactor) LearnerND._ask can be refactored to be so much more readable #67

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
1 task
basnijholt opened this issue Dec 19, 2018 · 1 comment
Closed
1 task

Comments

@basnijholt
Copy link
Member

(original issue on GitLab)

opened by Jorn Hoofwijk (@Jorn) at 2018-07-05T18:20:20.540Z

IT would be especially useful to split the method into multiple functions, with each function having only one simple specific task

The following discussion from gitlab:!68 should be addressed:

  • @jbweston started a discussion:

    IMO this loop could benefit from factoring parts out, or perhaps merely commenting different code blocks.

    My understanding of the algorithm is that we pick the simplex with the biggest loss, and add a point there.

    The extra complications come from the fact that (if I understand correctly), a given simplex may have a "subtriangulation" of pending points.

    At the moment we maintain 2 data structures losses and pending_losses. Perhaps we could treat these on the same footing, e.g. by storing the triangulation along with the simplices (we can discuss this in person). This would hopfully allow us to reduce the number of conditional statements in the loop body.

@basnijholt
Copy link
Member Author

originally posted by Jorn Hoofwijk (@Jorn) at 2018-07-13T13:37:45.815Z on GitLab

actually while rewriting the _ask method, we could speed it up a lot (see https://gitlab.kwant-project.org/qt/adaptive/issues/80)

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

No branches or pull requests

1 participant