GithubHelp home page GithubHelp logo

Comments (7)

vanbenschoten avatar vanbenschoten commented on May 28, 2024 1

Yeah, in this case you'll probably have to do some custom handling of the gaps. I'd recommend concatenation of the data where possible.

from matrixprofile-ts.

vanbenschoten avatar vanbenschoten commented on May 28, 2024

@Modestas96 the code should be able to handle missing data, so long as the gaps are small relative to the subsequence length. Can you give some more details about the issue?

from matrixprofile-ts.

Modestas96 avatar Modestas96 commented on May 28, 2024

Understood, in my example the gaps are relatively big, so I was wondering if I have to deal with them specifically myself or the algorithm will be able to handle it. So what happens in my case is that algorithm returns matrix profile with only nan or inf values.

from matrixprofile-ts.

previsualconsent avatar previsualconsent commented on May 28, 2024

I'm curious about how to specify missing data. I used nan's but this broke the results.

import numpy as np
import matplotlib.pyplot as plt
from matrixprofile import *

x = np.linspace(0,100*np.pi,1001)
y = np.sin(x)
mp,ind = matrixProfile.stomp(y,25)
print("No NaNs:", mp[:10], ind[:10])

y[100] = np.nan
mp,ind = matrixProfile.stomp(y,25)
print("One NaN:", mp[:10], ind[:10])```

Output

No NaNs: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [20. 21. 22. 23. 24. 25. 26. 27. 28. 29.]
One NaN: [nan nan nan nan nan nan nan nan nan nan] [inf inf inf inf inf inf inf inf inf inf]

Is there a different way to handle missing data?

from matrixprofile-ts.

tylerwmarrs avatar tylerwmarrs commented on May 28, 2024

@vanbenschoten This issue should not be closed. The current stomp implementation does not correctly handle missing values.

from matrixprofile-ts.

vanbenschoten avatar vanbenschoten commented on May 28, 2024

@tylerwmarrs agreed

from matrixprofile-ts.

vanbenschoten avatar vanbenschoten commented on May 28, 2024

The latest code version (0.0.7) takes care of this issue.

from matrixprofile-ts.

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.