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 use to_time_series_dataset with a multidimensional dataset #489

Open
AndreasAZiegler opened this issue Oct 21, 2023 · 1 comment
Open

Comments

@AndreasAZiegler
Copy link

Describe the bug
I have a dataset with 116 time series, every time series has 6 dimensions and a length of 578 elements. When I have the data the following way

len(dataset)
116
len(dataset[0])
6
len(dataset[0][0])
578

to_time_series_dataset(dataset) returns an array of shape (116, 6, 578) therefore (number of time series, dimensions, length of time series). However, the documentation mentions the data format (n_ts, max_sz, d).

To Reproduce
dataset = to_time_series_dataset(dataset)

Expected behavior
dataset.shape = (116, 578, 6)

Environment (please complete the following information):

  • OS: Linux
  • tslearn version: 0.1.29-1
@rtavenar
Copy link
Member

Hi @AndreasAZiegler

to_time_series_dataset does not reorder dimensions, so if your array (or array-like) is of shape (116, 6, 578), you will have to transpose it before passing it to to_time_series_dataset.

@rtavenar rtavenar removed the bug label Oct 23, 2023
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