Skip to content

Commit

Permalink
fix base case
Browse files Browse the repository at this point in the history
  • Loading branch information
paxcema committed Apr 30, 2024
1 parent 9e2c2da commit d07c086
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dataprep_ml/splitters.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ def splitter(

# Final assertions for time series
if min(len(train), len(dev)) < tss.get('window', 1):
raise Exception(f"Dataset size is too small for the specified window size ({tss.get('window')})")
raise Exception(f"Dataset size is too small for the specified window size ({tss.get('window', 1)})")

if min(len(train), len(dev), len(test)) < tss.get('horizon', 1):
raise Exception(f"Dataset size is too small for the specified horizon size ({tss.get('horizon')})")
raise Exception(f"Dataset size is too small for the specified horizon size ({tss.get('horizon', 1)})")

return {"train": train, "test": test, "dev": dev, "stratified_on": stratify_on}

Expand Down

0 comments on commit d07c086

Please sign in to comment.