Skip to content

Commit 37a9173

Browse files
committed
remove rint and go abck to .7, .2, .1 test train val split in testing
1 parent 60393ff commit 37a9173

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

label_maker/package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def package_directory(dest_folder, classes, imagery, ml_type, seed=False, split_
102102
y_vals = np.array(y_vals, dtype=np.uint8)
103103

104104
# Get number of data samples per split from the float proportions
105-
split_n_samps = np.rint([len(x_vals) * val for val in split_vals])
105+
split_n_samps = [len(x_vals) * val for val in split_vals]
106106

107107
if np.any(split_n_samps == 0):
108108
raise ValueError('split must not generate zero samples per partition, change ratio of values in config file.')

test/fixtures/integration/config_3way.integration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
"ml_type": "classification",
2020
"seed": 19,
2121
"split_names": ["train", "test", "val"],
22-
"split_vals": [0.6, 0.2, 0.2]
22+
"split_vals": [0.7, 0.2, 0.1]
2323
}

0 commit comments

Comments
 (0)