GithubHelp home page GithubHelp logo

ire7715 / ucr_dtw Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 2.0 3.87 MB

An implementation of "Searching and Mining Trillions of Time Series Subsequences under Dynamic Time Warping, 2011"

Ruby 100.00%

ucr_dtw's Introduction

UCR_DTW

An implementation of "Searching and Mining Trillions of Time Series Subsequences under Dynamic Time Warping, 2011"


Improvement

  • Fix the sorting bug. (Origin version wouldn't swap when the difference of two values is less than 1.)
  • Delay the z-normalize for t sequence. (Only dtw apply the tz array, so there is no need to do z-normalize when keogh_data)
  • Jump pruning: When we are pruning by sorted lower bound, we can find out that which index is the leading computed index(j). And instead of moving the window by 1, we jump to (j+1) directly. Jump pruning prunes over 50% for query2.txt.

Result without jump pruning

ruby UCR_DTW.rb Data.txt Query2.txt 0.1 -nj

Location: 430264
Distance: 3.7906991699901917
Data scanned: 1000000
Execution time: 121.967059865

Pruned by Jump: 0.0%
Pruned by LB_Kim: 22.6827%
Pruned by LB_Keogh: 35.9776%
Pruned by LB_Keogh2: 36.5951%
DTW Calcuation  : 4.744599999999991%

Result with jump pruning

ruby UCR_DTW.rb Data.txt Query2.txt 0.1

Location: 430264
Distance: 3.7906991699901917
Data scanned: 1000000
Execution time: 59.746849525
 
Pruned by Jump: 57.7814%
Pruned by LB_Kim: 16.4837%
Pruned by LB_Keogh: 15.1936%
Pruned by LB_Keogh2: 7.7391%
DTW Calcuation  : 2.802199999999999%

ucr_dtw's People

Contributors

ire7715 avatar

Stargazers

Blur Radius avatar

Watchers

James Cloos avatar  avatar

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.