Skip to content

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

@basnijholt

Description

@basnijholt

(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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions