-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Labels
Description
The distance profile is not calculated reliably for constant motifs. Given the following code, 0, 1 or 2 dips are seen:
import numpy as np
import stumpy
import matplotlib.pyplot as plt
tgtLength = 5000
tgt = np.zeros(tgtLength, dtype = np.float32)
for index in range(tgtLength):
if index < 500:
tgt[index] = np.random.rand(1)[0]
if index >= 500 and index < 1000:
tgt[index] = 3
if index >= 1000:
tgt[index] = np.random.rand(1)[0]
window_size = 500
qry = np.ones(window_size, dtype = np.float32) * 3
plt.plot(tgt)
plt.plot(qry)
plt.show()
plt.close()
distance_proile = stumpy.mass(qry, tgt)
plt.plot(distance_proile)
plt.show()
plt.close()
Is it only on my machine ?