Skip to content

Commit

Permalink
SliceAndShuffle fix (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
liyiersan authored Mar 26, 2024
1 parent b90e021 commit 903bff4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tsgm/models/augmentations.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ def generate(self, X: TensorLike, y: Optional[TensorLike] = None, n_samples: int
slices.append(s)
slices.append(sequence[start_idx:])
np.random.shuffle(slices)
# concatenate the slices
sequence = np.concatenate(slices)
synthetic_data.append(sequence)
if has_labels:
new_labels.append(y[i])
Expand Down

0 comments on commit 903bff4

Please sign in to comment.