Giter Site home page Giter Site logo

For the images part, it seems to accept same width and height of images (ex: 32*32) and not different width and height (ex: 32*39). Any fix? about pyts HOT 12 OPEN

johannfaouzi avatar johannfaouzi commented on May 12, 2024
For the images part, it seems to accept same width and height of images (ex: 32*32) and not different width and height (ex: 32*39). Any fix?

from pyts.

Comments (12)

johannfaouzi avatar johannfaouzi commented on May 12, 2024

Are you talking about the algorithms in the pyts.image module? For all of them it does not make much sense to have different width and height, since the idea overall is to get some information between time points: f(x_i, x_j).

from pyts.

zneha avatar zneha commented on May 12, 2024

from pyts.

johannfaouzi avatar johannfaouzi commented on May 12, 2024

If you give a float between 0 and 1, the size of the image will be proportional to the length of your time series.

So if you set image_size=p, the size of the image will be (ceil(p * length), ceil(p * length)).

With p=0.5 for instance, it would give:

  • ceil(0.5 * 1225) = 613
  • ceil(0.5 * 1248) = 624

from pyts.

zneha avatar zneha commented on May 12, 2024

from pyts.

johannfaouzi avatar johannfaouzi commented on May 12, 2024

I don't understand why you want different values as it does not make sense.

If you really want different width and height, just set image_size to the larger value (39), you will get an image with shape (39, 39) and you can crop / downsample this image so that its new shape is (32, 39).

from pyts.

zneha avatar zneha commented on May 12, 2024

from pyts.

zneha avatar zneha commented on May 12, 2024

from pyts.

johannfaouzi avatar johannfaouzi commented on May 12, 2024

The thing is that there is no relationship of this kind. If you want to transform your 1D-time series into an 2D-array without performing in any modification of the values, you can use numpy.reshape. But it is totally different from what the algorithms in the pyts.image module do.

from pyts.

zneha avatar zneha commented on May 12, 2024

Is it not that, this entire module is to convert a time series to a matrix (image esentially)?

from pyts.

johannfaouzi avatar johannfaouzi commented on May 12, 2024

Yes, and the image will always be a square matrix.

from pyts.

zneha avatar zneha commented on May 12, 2024

from pyts.

johannfaouzi avatar johannfaouzi commented on May 12, 2024

No.

from pyts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.