In [1]:
import os 
os.getcwd()


Out[1]:
'/home/psenin/git/saxpy/jupyter'

In [2]:
os.chdir("/home/psenin/git/saxpy")
import numpy as np
from saxpy.hotsax import find_discords_hotsax

In [3]:
from numpy import genfromtxt
dd = genfromtxt("data/ecg0606_1.csv", delimiter=',')  
len(dd)


Out[3]:
2299

In [4]:
import matplotlib.pyplot as plt
plt.plot(dd)
plt.show()



In [5]:
discords = find_discords_hotsax(dd)

In [6]:
discords


Out[6]:
[(430, 5.2790800061718386), (318, 4.1757563573086953)]

In [8]:
discords = find_discords_hotsax(dd[0:400], 100, 4)
discords


Out[8]:
[(173, 5.1145707192350738),
 (26, 4.9594742669641381),
 (299, 2.3370302965046825)]

In [ ]:


In [ ]: