MPoL-dev / MPoL

A flexible Python platform for Regularized Maximum Likelihood imaging
https://mpol-dev.github.io/MPoL/
MIT License
33 stars 11 forks source link

Dartboard: handle case for 1 k-fold #222

Closed jeffjennings closed 9 months ago

jeffjennings commented 9 months ago

DartboardSplitGridded doesn't currently handle the case for 1 k-fold, only 2+. DartboardSplitGridded isn't needed to train on a full dataset obviously, but for a standard train/test procedure, PR adds default behavior in DartboardSplitGridded of splitting dataset into (roughly) 80/20 train/test when k-fold == 1. The train set still keeps the smallest dartboard cells, as is does for 2+ k-folds.

jeffjennings commented 9 months ago

Sure I can add that. Beyond the test, the ratio will vary between datasets or random seeds because the dartboard cells don't have uniform points at a given radius, but it should vary by <~5% I'd think.

jeffjennings commented 9 months ago

Test added, ready for re-review.