pylabel icon indicating copy to clipboard operation
pylabel copied to clipboard

how to split YOLO datasets to train/val. Not train/val/test

Open pizixie opened this issue 1 year ago • 1 comments

I tried code:

 ds.splitter.GroupShuffleSplit(train_pct=0.7,val_pct=0.2,test_pct=0.0)

get

ValueError: train_size=0.0 should be either positive and smaller than the number of samples 376 or a float in the (0, 1) range

Why the param test_pct cannot be zero???

pizixie avatar Nov 03 '23 02:11 pizixie

Hello @pizixie sorry for the confusion.

If you want to split into only 2 groups (train and test), then set val_pct to 0. It is not supported to set test_pct = 0. I will update the function with better documentation and error handling.

alexheat avatar Nov 21 '23 19:11 alexheat