Skip to content

Commit

Permalink
add evaluation tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderVNikitin committed Dec 14, 2023
1 parent 0a6ca8e commit 728d81b
Show file tree
Hide file tree
Showing 5 changed files with 848 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tsgm/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ def Xy_concat(self) -> tsgm.types.Tensor:
elif len(self._y.shape) == 2:
if self._y.shape[1] == 1:
return np.concatenate((self._x, np.repeat(self._y[:, :, None], self._x.shape[1], axis=1)), axis=2)
else:
elif self._y.shape[1] == self._x.shape[1]:
return np.concatenate((self._x, self._y[:, :, None]), axis=2)
else:
return np.concatenate((self._x, np.repeat(self._y[:, None, :], self._x.shape[1], axis=1)), axis=2)
else:
raise ValueError("X & y are not compatible for Xy_concat operation")

Expand Down
2 changes: 1 addition & 1 deletion tutorials/augmentations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@
}
],
"source": [
"n, n_ts, n_features = 1000, 24, 5\n",
"n, n_ts, n_features = 1000, 24, 5\n",
"data = tsgm.utils.gen_sine_dataset(n, n_ts, n_features)\n",
"scaler = tsgm.utils.TSFeatureWiseScaler() \n",
"scaled_data = scaler.fit_transform(data)\n",
Expand Down
Loading

0 comments on commit 728d81b

Please sign in to comment.