pik-copan / pyunicorn

Unified Complex Network and Recurrence Analysis Toolbox
http://pik-potsdam.de/~donges/pyunicorn/
Other
195 stars 86 forks source link

Help wanted - multidimensional data #172

Closed drkousek closed 1 year ago

drkousek commented 1 year ago

Hey! I was looking into pyunicorn, used Google colab to let it work. What happened. I want to pass multidimensional numpy array, unfortunately I get this error and I am not able to resolve it. When I use DataFrame as source, i get error: /usr/local/lib/python3.8/dist-packages/pyunicorn/timeseries/recurrence_plot.py:151: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access self.time_series.shape = (self.time_series.shape[0], -1) When I convert it to numpy array, I get this. image I am pretty lost now at the moment, what do you suggest? How to transform it, so pyunicorn would accept it? (I am sorry if I duplicate something, but I did not find answer to this here) TLDR: Have multidimensional data, wanted to process it by pyunicorn, how? <3

zugnachpankow commented 1 year ago

Hey @drkousek,

at first sight this seems like a problem with numpy to me, so in your case with the pd.to_numpy() method. Did you check if that transformation works outside of the ReccurencePlot method?

If the transformation itself is not the problem I would ask you to provide your full script and if possible you DataFrame or atleast something like df.head() to see the shape of it.

zugnachpankow commented 1 year ago

I will close this issue for now, assuming that you were able to resolve the problem. Feel free to open it up again or reach out if there is any other problem!

Best