Skip to content
Snippets Groups Projects
Commit e6b1d6b2 authored by Simon Belak's avatar Simon Belak
Browse files

Add breaks test

parent 926cc24b
No related branches found
No related tags found
No related merge requests found
......@@ -147,8 +147,10 @@
range (- (apply max window) (apply min window))
ql (q left)
qr (q right)]
{:eta (/ (reduce + (map (comp k.math/sq -) ql qr))
3 (k.math/sq range))
{:eta (if (zero? range)
0
(/ (reduce + (map (comp k.math/sq -) ql qr))
3 (k.math/sq range)))
:x pivot
:idx idx}))
(partition half-period 1 series)
......
......@@ -43,7 +43,14 @@
(expect
true
(every? (decompose :month ts) [:trend :residual :seasonal]))
(expect
nil
(decompose 100 ts))
(expect
[[99]
[]]
[
(breaks 12 (map vector (range) (concat (repeat 100 10)
(repeat 100 20))))
(breaks 12 (map vector (range) (take 100 (cycle (range 10)))))])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment