コード例 #1
0
    dist = distancefunc(name="manhattan")
    
    windowtype="itakura"
    
    figure_number = 1
    
    window, distance, path = dtwpy.dtw(query, template, dist=dist, windowtype=windowtype, windowsize=50,pattern="symmetric1", normalized=False,dist_only=False, cost=True)
    
    T = ii - P
    
    CC = C[T]
    
    L = str(ii)
    
    
    pltt.plotting(query, template, e, f, path,figure_number,L,CC)
    
    print('Column '+L+' plotted')




a = np.arange(0,3120,1)
b = np.arange(0,3120,1)


c = []

for i in a:
    c.append((a[i],b[i]))
                                       dist=dist,
                                       windowtype=windowtype,
                                       windowsize=1500,
                                       pattern="symmetric1",
                                       normalized=False,
                                       dist_only=False,
                                       cost=True)

    CC = C[ii]

    L = str(ii)

    dis = distance
    Dis = str(dis)

    pltt.plotting(query, template, e, f, path, figure_number, L,
                  CC)  #Uncomment this if you want to see the alignment plotted

    Diss.append(Dis)

plt.figure(3)
plt.plot(x, y1, 'b--', label='Original amplitude normal distribution')
plt.plot(x, y2, 'r--', label='Higher amplitude normal distribution')
plt.plot(
    x3,
    y3,
    'g--',
    label='Original amplitude normal distribution with shifted mean(+200)')
#plt.plot(x4,y4,'c--',label='Original amplitude normal distribution with shifted mean(-400)')
#plt.plot(x5,y5,'m--',label='Original amplitude normal distribution with shifted mean(-100)')
#plt.plot(x,y6,'y--',label='Lower amplitude normal distribution')
plt.plot(