deeptime-ml / deeptime

Python library for analysis of time series data including dimensionality reduction, clustering, and Markov model estimation
https://deeptime-ml.github.io/
GNU Lesser General Public License v3.0
755 stars 84 forks source link

Applying TICA to ragged feature vectors #289

Closed ryankzhu closed 9 months ago

ryankzhu commented 9 months ago

Hi, I am doing tica transformation on some featurised md trajectories of different lengths List[np.ndarray] of shape (x, 15) where x differs. I got the following error:

ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (1983,) + inhomogeneous part.

I guess it's because I am having a ragged list of arrays that can't be converted to a single array. Is there a away to directly apply tica to such feature vectors?

clonker commented 9 months ago

Not directly, no; the data has to live in some vector space. If you can formulate it that way then tica should be (at least technically) applicable. You can also try vampnets to find a non-ragged embedding of your data and then use tica on top of that.

ryankzhu commented 9 months ago

Okay thank you very much for the suggestion!