johannfaouzi / pyts

A Python package for time series classification

Home Page:https://pyts.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can we reverse image to time-series

fengsxy opened this issue · comments

Description

I have known that the time-series method coould be rerversed but i don't find any solutions to reverse.Is there any difficulty?

Hi,

Sorry for the delayed response. The inverse transformations are not currently implemented. Here are the specific details for each imaging transformation:

  • Recurrence plot: To transform the image into a time series, you need to solve a system of quadratic equations, which is not trivial (and probably computationally expensive)
  • Gramian Angular Fields: To transform the image into a time series, you need to solve a system of linear equations, which is simple. However, you lose the original scale of the time series, because the time series have to be rescaled to a range [a, b] in [-1, 1], so the time series would be rescaled to range [a, b].
  • Markov Transition Field: To transform the image into a time series, you need to save the stochastic matrix of the first-order Markov chain (and possibly the indices in case the values in this matrix are not unique) so that you can compute the Markov chain. Finally, you also need to save a value for each bin to turn the discrete-valued time series (Markov chain) into a real-valued time series. Thus, you need to save a lot of information in order to only obtain an approximation of the original time series.

Could you please give me more information why you need to transform images into time series? If you have the original time series, it's obviously not necessary (and it's complex to do it anyway because these images try to summarize information from the time series, so you lose information about the original time series). Do you have images (possibly generated) that you want to transform into time series?

Best,
Johann