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

ValueError: The numbers of series in X and Y are different. #13

Open
talhaanwarch opened this issue Jun 22, 2020 · 3 comments
Open

ValueError: The numbers of series in X and Y are different. #13

talhaanwarch opened this issue Jun 22, 2020 · 3 comments
Labels
question Further information is requested

Comments

@talhaanwarch
Copy link

The shape of X is (54, 337) and the shape of y is (54,).
But I am getting error. I am using the following code

from tsaug import TimeWarp, Crop, Quantize, Drift, Reverse
my_augmenter = (
    TimeWarp() * 5  # random time warping 5 times in parallel
    + Crop(size=300)  # random crop subsequences with length 300
    + Quantize(n_levels=[10, 20, 30])  # random quantize to 10-, 20-, or 30- level sets
    + Drift(max_drift=(0.1, 0.5)) @ 0.8  # with 80% probability, random drift the signal up to 10% - 50%
    + Reverse() @ 0.5  # with 50% probability, reverse the sequence
)
data, labels = my_augmenter.augment(data, labels)
@tailaiw
Copy link
Contributor

tailaiw commented Jun 22, 2020

The Y in tsaug is considered as point-wise label to X. In other words, if Y is present, then it is assumed for segmentation purpose. I guess your problem is a classification problem as you have 54 time series (each of which has 337 time points) and your label is per series instead of per time point. If so, you only need to augment X and assume the classification labels invariant.

@tailaiw tailaiw added the question Further information is requested label Jun 22, 2020
@talhaanwarch
Copy link
Author

The Y in tsaug is considered as point-wise label to X. In other words, if Y is present, then it is assumed for segmentation purpose. I guess your problem is a classification problem as you have 54 time series (each of which has 337 time points) and your label is per series instead of per time point. If so, you only need to augment X and assume the classification labels invariant.

After doing this, shape of X is (270, 300) and the shape of y is (54,). So how can I make the shape of y equal in length of X? Is each row is augmented exactly the 5 times? or there are some rows augmented more and some less.

@tailaiw
Copy link
Contributor

tailaiw commented Jul 7, 2020

Yes, every row is augmented exactly 5 times.

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