Hi Xuan Kan,
Thanks for your great work on this project! I was reading through the code and found a minor bug in the init_stratified_dataloader function where the sizes of the validation set and test set are accidentlly swapped.
Description
In the second split (split2), test_size is set to test_length. However, StratifiedShuffleSplit.split() returns a tuple in the format of (train_index, test_index) — meaning the first element is the remaining data and the second is the split-out data.
split2 = StratifiedShuffleSplit(n_splits=1, test_size=test_length)
for test_index, valid_index in split2.split(final_timeseires_val_test, stratified):
Because of the variable unpacking order here, test_index receives the remaining data (which is val_length), and valid_index receives the split-out data (which is test_length). This causes the actual dataset sizes to be swapped.
Hi Xuan Kan,
Thanks for your great work on this project! I was reading through the code and found a minor bug in the init_stratified_dataloader function where the sizes of the validation set and test set are accidentlly swapped.
Description
In the second split (split2), test_size is set to test_length. However, StratifiedShuffleSplit.split() returns a tuple in the format of (train_index, test_index) — meaning the first element is the remaining data and the second is the split-out data.
Because of the variable unpacking order here, test_index receives the remaining data (which is val_length), and valid_index receives the split-out data (which is test_length). This causes the actual dataset sizes to be swapped.