Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to augment multi_variate time series data? #9

Open
talhaanwarch opened this issue Mar 29, 2020 · 2 comments
Open

How to augment multi_variate time series data? #9

talhaanwarch opened this issue Mar 29, 2020 · 2 comments
Labels
question Further information is requested

Comments

@talhaanwarch
Copy link

I noticed that while augmenting multi-variate time series data, augmented data is concatenated on 0 axes, instead of being added to a new axis ie third axis.
Let suppose data shape is (18,1000), after augmentation it turns to be (72,1000), but i believe it should be (4,18,1000). simply reshaping data.reshape(4,18,1000) resolve the problem or not?

@tailaiw tailaiw added the question Further information is requested label Mar 31, 2020
@tailaiw
Copy link
Contributor

tailaiw commented Mar 31, 2020

@talhaanwarch An input X should be a numpy array with shape (n,), (N, n), or (N, n, c), where n is the length of each series, N is the number of series, and c is the number of channels. Therefore, if we have a single original time series with 18 channels and 1000 time points, the shape of X should be (1, 1000, 18). Augmenting it by M times will return an output with shape (M, 1000, 18).

X = np.cumsum(np.random.normal(size=(1,1000, 18)), axis=1)  # (1, 1000, 18)
plot(X)

image

aug = tsaug.RandomTimeWarp() * 4
X_aug = aug.run(X)    # (4, 1000, 18)
plot(X_aug)

image

@talhaanwarch
Copy link
Author

How can I get an original signal after augmentation, I think I lost that, if I don't save it explicitly and then concatenate augmented and the original signal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants