Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MASS - First distance missing #9

Open
albertasdvirnas opened this issue Sep 25, 2019 · 3 comments
Open

MASS - First distance missing #9

albertasdvirnas opened this issue Sep 25, 2019 · 3 comments

Comments

@albertasdvirnas
Copy link

  • MASS version: 0.1.3
  • Python version: 2.7
  • Operating System: Ubuntu

Description

I was trying to compare two time series query=X and ts=XY, i.e. time series has identical beginnings

What I Did

I ran actual = mts.mass(ts, query)

I noticed that the algorithm doesn't return a score of query along the first position of ts. A hot fix seems to add some random number in front of ts

@tylerwmarrs
Copy link
Contributor

tylerwmarrs commented Oct 4, 2019

@albertasdvirnas Thank you for submitting the issue. I am actually unable to reproduce the missing first distance with the MASS algorithm.

If you can provide some data to reproduce the issue, it would help me out a lot.

@albertasdvirnas
Copy link
Author

ts = np.array([ 2, 1, 1, 4, 5])
query = np.array([2, 1, 1, 4])
actual = mts.mass(ts, query)

returns array([1.85113597]), while I expect it to return something like

array([0, 1.85113597]) ?

@tylerwmarrs
Copy link
Contributor

Generally, MASS2 is the preferred algorithm over MASS. I simply implemented MASS to try to have a complete module. The original author's implementation of MASS has this same caveat.

image

If you have a solution to fix this, then feel free to make a contribution. The original MASS implementation is here:

https://www.cs.unm.edu/~mueen/findNN.html

@tylerwmarrs tylerwmarrs changed the title mass function MASS - First distance missing Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants