time-series-0.1.0.0: Time series analysis.

Portabilityportable
Stabilityexperimental
Safe HaskellSafe-Inferred

TimeSeries.Window

Description

Window for time series analysis.

Later these shall relate to memory and FPGA internal registers in hardware...

Synopsis

Documentation

newtype Window Source

Newtype for windowd data.

Shall relate to memory contents in hardware.

Constructors

Window (UArray Word64 Double) 

Instances

type Size = Word64Source

Considering to restrict window size to power of 2, at least for initial phase.

data RandomVector Source

Random vector.

Constructors

RandomVector 

Fields

unitRV :: Window

Unit random vector.

controlRV :: Window

Control random vector, mentioned as b in the paper.

fromList :: [Double] -> WindowSource

Create window from assoc list.

empty :: Size -> WindowSource

Window of given size, filled with zeros.

push :: Double -> Window -> WindowSource

Put given Double as first element, shifts all the other element except for the last one, which being removed.

singleton :: Double -> WindowSource

Size 1 window containing given value.

norm :: Window -> Window -> DoubleSource

Norm, by viewing window as vector.

>>> let x = fromList [0,3,4]
>>> let y = fromList [0,0,0]
>>> distance x y
5.0

append :: Window -> Window -> WindowSource

Append two windows, with shifting the contents of second window. Last n elements of second window is removed, where n is number of elements in first window.

sumWindow :: Window -> DoubleSource

Sums up window elements.

sumSqWindow :: Window -> DoubleSource

Sums up square of window elements.

dotp :: Window -> Window -> DoubleSource

Dot product of given two windows.

dotps :: [Window] -> Window -> WindowSource

Dot produt of list of window.

copyContentsSource

Arguments

:: Window

Destination window.

-> Window

Source window.

-> Window 

Copy contents of window to another.

randomVectorSource

Arguments

:: Integer

Random seed.

-> Size

bw, size of basic window.

-> Size

nb, size of control vector.

-> RandomVector 

Create window for random vectors.

wholeRandomVectorSource

Arguments

:: RandomVector

Random vector used to convolve the contents.

-> Window

Random vector with size bw * nb.

Create whole random vector from RandomVector.

Unit random vector and control vector in given RandomVector is convolved.

pretty :: Window -> StringSource

Show contents of window with printf.

average :: Window -> DoubleSource

Average of window contents.

variance :: Window -> DoubleSource

Variance of window contents.

length :: Window -> IntSource

Length of window.