From 85405f4da24d33a6b7e88772342ea4a2d229bdcf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Laurent?= <francois.laurent@posteo.net>
Date: Tue, 27 Dec 2022 12:53:21 +0100
Subject: [PATCH] fixes #18

---
 src/taggingbackends/data/dataset.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/taggingbackends/data/dataset.py b/src/taggingbackends/data/dataset.py
index 80b0280..3159921 100644
--- a/src/taggingbackends/data/dataset.py
+++ b/src/taggingbackends/data/dataset.py
@@ -186,14 +186,14 @@ def subset_size(ntot, train_share, val_share, test_share):
     while ndelta < 0:
         if 0 < val_share:
             nval += 1
-            ndelta -= 1
+            ndelta += 1
         if ndelta < 0:
             if 0 < test_share:
                 ntest += 1
-                ndelta -= 1
+                ndelta += 1
             if ndelta < 0:
                 ntrain += 1
-                ndelta -= 1
+                ndelta += 1
     while 0 < ndelta:
         if 0 < train_share:
             ntrain -= 1
-- 
GitLab