plotting datasets in hv, also better split with dropna

This commit is contained in:
wassname
2020-10-31 18:12:58 +08:00
parent 9a7f2f018c
commit d6d47b87e6
7 changed files with 14254 additions and 25355 deletions
+4
View File
@@ -37,6 +37,7 @@ class Seq2SeqDataSet(torch.utils.data.Dataset):
self.window_past = window_past
self.window_future = window_future
self.columns_target = columns_target
self.columns_past = columns_past
# For speed
self._icol_blank = [df.drop(columns = columns_target).columns.tolist().index(n) for n in columns_past]
@@ -84,6 +85,9 @@ class Seq2SeqDataSet(torch.utils.data.Dataset):
"""
Output pandas dataframes for display purposes.
"""
if i<0:
# Handle negative integers
i = len(self)+i
x_cols = list(self.df.drop(columns=self.columns_target).columns) + ['tsp_days', 'is_past']
x_past, y_past, x_future, y_future = self.get_components(i)
t_past = self.df.index[i:i+self.window_past]