GithubHelp home page GithubHelp logo

fpetitjean / dba Goto Github PK

View Code? Open in Web Editor NEW
180.0 180.0 45.0 1.32 MB

DBA: Averaging for Dynamic Time Warping

Home Page: http://www.francois-petitjean.com/Research/

License: GNU General Public License v3.0

Java 36.06% MATLAB 9.68% Python 54.15% Shell 0.11%

dba's People

Contributors

changweitan avatar fpetitjean avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dba's Issues

squared_DTW out of bounds error

When the number of channels is greater than the max length of a series, the squared_DTW failes in the following loop:
for i in range(1, s_len): cost_mat[i, 0] = cost_mat[i-1, 0]+delta_mat[i, 0]

Why should the cost matrix and delta_mat depend on the number of features in my feature vector?

Time Series Multivariate Support in Python

Does your implementation (Python) support DBA for varying time series lengths or does it assume all sequences are of a length T (as mentioned in your paper).

Does your implementation support multivariate time series data?

e.g.
series.shape

(number_of_time_series, length_time_series, dimensionality)

Averaging series with different lengths

Hi,

I have been playing around with the library by trying to plot the average series. It is clearly visible that the average series is not correct. For any advice I would be greatful.

n_dims = 1

t1=[106.7, 106.7, 99.94, 95.83, 92.84, 90.44, 88.3, 86.12, 82.22, 77.2]
t1_T = np.reshape(t1,(1,-1))
t2= [127.8, 127.8, 122.5, 117.4, 112.2, 107.2, 102.3, 97.47, 92.77, 88.2, 83.79, 79.53, 75.43, 71.49, 67.69, 64.02, 60.42, 56.87, 53.3, 49.6, 45.64, 41.24, 36.27, 30.97, 25.83, 21.09, 16.69, 12.58, 8.671, 4.92, 1.294]
t2_T = np.reshape(t2,(1,-1))
series = [t1_T,t2_T]

plt.figure()
#plotting the synthetic data
plt.plot(range(0,len(t1)), t1 ,label='synthetic data')
plt.plot(range(0,len(t2)), t2 ,label='synthetic data')
plt.legend()

#calculating average series with DBA
average_series = DBA.performDBA(series)

#plotting the average series
for d in range(0,n_dims):
    plt.plot(range(0,average_series.shape[1]), average_series[d],label='average data')
plt.legend()
plt.show()

Figure_1

how to use DBA

Hi,

I have 10000 time series biological data . each is 12000 in length.
It seems DTW is prohibitively expensive while DBA is very promising.
Can you teach me how to you DBA to speed us calculating distances and cluster all the data?
Thanks a lot.
Huanle
PS: i am a biologist, knowing nothing but a bit of python programming.

Creating an average for timeseries with length more than 1000

First of all thanks a lot for making this code available! I am enjoying using it :)

I aim to create an average of time series that are of a greater length than 1000 (around 9000). I was wondering where this constraint comes from and how I can adjust it. Right now I am slicing my time series per 10, so that the length is less than 1000. However, I really want to test what happens when I use the original time series.

Thanks a lot!

Parallelize the DTW process

I have around 200 time series, but they are of length 30,000. The DBA algorithm just doesn't converge (as expected). Would there be a way to parallelize the DTW process within your algorithm?
Since I am not from cs background (mechanical engineer), my foundations in time series analysis and coding are a bit weak. However, if you could give me quick walk through on what needs to be done, I suppose I should be able to figure out the solution,

Weighted DBA in DBA_multivariate.py

I'm trying to generate multivariate time series synthetic data using DBA. As mentioned in one of the papers cited, there are various methods for weight assigning. How do I add those functions in the code, what needs to be changed? Any help would be much appreciated.

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.