Closed carterbox closed 2 years ago
Hello @carterbox! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
src/tike/random.py
:Line 68:13: E741 ambiguous variable name 'l'
@stevehenke, the test don't pass consistently on the CI because the result is stochastic. I could make them always pass by choosing a random seed that works? What do you think?
That could be an initial band-aid approach. Perhaps it would be more robust to introduce a wrapper that runs the test many times to demonstrate that the result holds on average.
Purpose
Choose better random subsets for mini-batches.
Approach
ptychoshelves chooses sparse batches by trying to iteratively minimize the overlap between scanning positions within each subset. This method is similar. It uses the wobbly center algorithm to choose subsets that all try to be as similar to the population as a whole. i.e. both methods try to ensure that the subsets always do better than the worst case random sample.
Pre-Merge Checklists
Submitter
yapf
to format python code.Reviewer