mirror of
https://github.com/wassname/seq2seq-time.git
synced 2026-07-01 14:37:08 +08:00
misc
This commit is contained in:
@@ -16,4 +16,4 @@ def normalize_encode_dataframe(df, encoder=OrdinalEncoder):
|
||||
def timeseries_split(df, test_fraction=0.2):
|
||||
"""Split timeseries data with test in the future"""
|
||||
i = int(len(df)*test_fraction)
|
||||
return df.iloc[:i], df.iloc[i:]
|
||||
return df.iloc[:-i], df.iloc[-i:]
|
||||
|
||||
Reference in New Issue
Block a user