Code Monkey home page Code Monkey logo

Comments (4)

albertoazzari avatar albertoazzari commented on July 18, 2024 1

Yes, exactly outside the permitted band, we should fill the bounding matrix with +inf.

  1. I think that this bug could lead to incorrect distance measures, in any case, it can result in spurious analyses.
  2. Following the rules to compute the costs, if you have to compute the values in the diagonal cells, you should sum the Euclidean distances both for i,j and i-1, j-1.
    x1 = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0])

    x2 = np.array([10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0])
    
    x1_p = np.insert(x1, 0, 0)
    
    x2_p = np.insert(x2, 0, 0)
    
    dist = 0
    
    for i in range(1, len(x1_p)):
    
        dist += abs(x1_p[i] - x2_p[i]) + abs(x1_p[i-1] - x2_p[i-1])
        
    print(dist)
dist = 86.0
  1. I don't think z-scoring the time series in input is mandatory.

from sktime.

fkiraly avatar fkiraly commented on July 18, 2024

I see - I think you are right. Just to clarify, you think it should be filled with +inf outside the permitted band, right?

When we fix this, we should:

  • also update the docstrings to be very specific about the output matrix
  • ensure to add a test that checks actual against expected for window < 1.0

Further questions:

  • TWE distance is a "standard" distance afaik, right? does this mean, it would lead to spurious/incorrect low performance of baselines in predicive performance benchmarking studies?
  • can you explain how you obtain 86? I get 44, summing up the Euclidean distances.
  • is there perhaps an issue regarding normalization, e.g., by length of series yes/no in th computation? Docstring is not too clear which version of the distance this is, normalized or not, perhaps we should also fix this.

from sktime.

fkiraly avatar fkiraly commented on July 18, 2024

Ah, thanks for the clarification. I forgot the i-1 terms.

Would you like to make a pull request with a fix?

from sktime.

fkiraly avatar fkiraly commented on July 18, 2024

I don't think z-scoring the time series in input is mandatory.

Yes, of course - my issue is that it is not actually clear whether it is done or not, to a user.

from sktime.

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.