Closed robmarkcole closed 4 days ago
Hi @robmarkcole, thanks for pointing out the issue.
I'm working on another issue. When the PR is ready to be merged, I'll try to fix this issue too. I don't think fixing this will require much work to be done.
Btw, why would someone even want a split of 0.0?
This even makes sense: [0.01, 0.01, 0.98]
and it works fine.
If I remember correctly, Luca added the condition for each split to be greater than 0, while reviewing the PR.
if not all(0 < _f <= 1 for _f in splits):
raise ValueError("Each Split should be a float with each value in [0,1].")
I have a single dataset and typically random split it. However I also sometimes want to just test on it, so test weighting is 100%
Okay, I was thinking of just updating all(0 **<=** _f <= 1 for _f in splits)
will do the work, but, I also need to make some changes internally.
I'll try fixing it as soon as possible. Btw, if you've used train_test_split and any issues encountered, plz mention it here in the same thread. It'll be easier to club them and fix them at once.
🐛 Bug
The check
0 < _f <= 1
is failed for value of 0.0To Reproduce
Pass a value of
0.0
as a split to train_test_splitExpected behavior
I can have a split of 0.0
Environment
Master