Code Monkey home page Code Monkey logo

Comments (4)

patrickzib avatar patrickzib commented on September 23, 2024

Thank you for pointing this out.

There are two cases:

  1. the query is z-normed: thus we have to z-norm all the subsequences.

  2. query is not z-normed:
    a) we can either force the query to be z-normed, which is one call to query.norm() before performing the query or
    b) we can not apply z-normalization at all, which would be a check in getDistance.

Typically, we force the query to be z-normed in this case. However, I agree that it is possible to leave out z-norm, too. The proposed pull-request however, breaks the code by removing z-norm for subsequences.

from sfa.

assaad avatar assaad commented on September 23, 2024

For my understanding, it's better to return the un-normalized distance measure. So a potential fix will be: if the query is normalized -> unnormalize its values, if the timeseries is normalized -> un-normalize the values -> then calculate the euclidean distance between original un-normalized versions of both timeseries data and query :)
Big thanks anyway!

from sfa.

patrickzib avatar patrickzib commented on September 23, 2024

Removing it, is not sooo easy. For example, SFA uses the momentary Fourier transform. The MFT applies z-normalization to each subsequence:

TimeSeries.calcIncrementalMeanStddev(this.windowSize, timeSeries.getData(), means, stds);

The same does TimeSeries.getDisjointSequences and TimeSeries.getSubsequences

So, when removing it from getDistance, you suddenly try to lower bound un-normalized subsequences with z-normalized words. This should fail.

from sfa.

assaad avatar assaad commented on September 23, 2024

yes i know, that's why i didn't propose a fix. I saw that in subsequence matching, each subsequence is normalized with different mean and std, so i can't un-normalized. maybe we need 2 separate methods.

from sfa.

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.