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

Clarification regarding the data shape illustration #10

Closed
BY-hash opened this issue Dec 13, 2021 · 1 comment
Closed

Clarification regarding the data shape illustration #10

BY-hash opened this issue Dec 13, 2021 · 1 comment

Comments

@BY-hash
Copy link

BY-hash commented Dec 13, 2021

Hello,
Regarding the illustration of the shape of the data:
"Each training example will be a sequence of shape [1, time_steps, number_of_features]"
However, in the code:
"segments=segments.reshape([len(segments),(win_size + 1),1])"
If I understand correctly, win_size = number_of_features + 1 (because an extra feature of the tims step) and len(segments)=time_steps
So it seems there is a mismatch between the order of dimensions in the illustration and the code

Could you please clearify this issue?
Thank you!

@aqibsaeed
Copy link
Owner

aqibsaeed commented Dec 15, 2021

Hi,

[1, time_steps, number_of_features] is correct, where 1 or first dimension represents the batch size or total number of examples. In segments if I remember correctly there was only one feature for each timestep. len(segments) are the total number of examples, which in your example is 1. For example, for an accelerometer signal, we can generate training examples with time steps = 500, number of features = 3 (i.e., 3-axes of accelerometer signal) and the first dimension will simply represent total number of examples. Hope this helps.

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

No branches or pull requests

2 participants