Skip to content

Commit

Permalink
DartboardSplitGridded: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffjennings committed Dec 4, 2023
1 parent 000e435 commit 05473f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mpol/crossval.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,10 @@ def __next__(self) -> tuple[GriddedDataset, GriddedDataset]:
if self.k == 1:
if self.verbose is True:
logging.info(" DartboardSplitGridded: only 1 k-fold: splitting dataset as ~80/20 train/test")
# number of cells ~equal to 20% of full cell list
ntest = round(0.2 * len(k_list[0]))
# put ~20% of cells into test set
cell_list_test = k_list[0][:ntest]
# remove cells place in test set from train set
# remove cells in test set from train set
k_list[0] = np.delete(k_list[0], range(ntest), axis=0)
else:
cell_list_test = k_list.pop(self.n)
Expand Down

0 comments on commit 05473f0

Please sign in to comment.