In [1]:
import os
import sys
sys.path.append("..")

In [3]:
from saxpy import znorm
ts = [-1., -2., -1., 0., 2., 1., 1., 0.]
z_thrsh = 0.001
x_scaled = [x / 100.0 for x in ts]
znorm.znorm(x_scaled, z_thrsh)


Out[3]:
array([-0.81649658, -1.63299316, -0.81649658,  0.        ,  1.63299316,
        0.81649658,  0.81649658,  0.        ])

In [4]:
ts = [-0.1, -0.2, 0.2, 0.1]

In [7]:
znorm.znorm(ts, z_thrsh)


Out[7]:
array([-0.63245553, -1.26491106,  1.26491106,  0.63245553])

In [12]:
from numpy import std
std(znorm.znorm(ts, 0.5))


Out[12]:
0.158113883008419

In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [8]:
os.getcwd()


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

In [2]:
sys.path


Out[2]:
['',
 '/home/psenin/anaconda3/lib/python36.zip',
 '/home/psenin/anaconda3/lib/python3.6',
 '/home/psenin/anaconda3/lib/python3.6/lib-dynload',
 '/home/psenin/anaconda3/lib/python3.6/site-packages',
 '/home/psenin/anaconda3/lib/python3.6/site-packages/IPython/extensions',
 '/home/psenin/.ipython',
 '..']