Skip to content

Panel data is pandas, clustering expects numpy #603

Answered by TonyBagnall
steipatr asked this question in Q&A
Discussion options

You must be logged in to vote

hi, clustering does not have the converters yet. All of clustering/classification/regression work internally with numpy arrays of shape (n_cases, n_channels, n_timepoints), so your data should be in numpy of shape (1000,1, 401). Classification and regression simply convert multiindex to numpy internally (as will clustering when we finish the base redesign). You can convert yourself, or there are converters in aeon. I dont know how to generate a random pd.MultiIndex, I have never used them, we work with numpy almost exclusively, so just convert back and forth :) Multiindex seems to just be long format?

from aeon.datatypes import convert
import numpy as np

X = np.random.random(size=(1000,1,4…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by steipatr
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants