Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EDM ¶
EDM performs the approximate E-divisive with means calculation as described in https://courses.cit.cornell.edu/nj89/docs/edm.pdf.
EDM is an algorithm for finding breakout points in a time-series data set. The function accepts the input vector, and a window width that describes the search window during which the median breakout must occur. The window, ∂, is described in the paper.
Note this algorithm uses the interval tree median approach as described in the paper. The medians used will have a resolution of 1/(2^d), where d is max(log2(len(input)), 10). That is the value recommended in the paper.
Types ¶
type IntervalTree ¶
type IntervalTree struct {
// contains filtered or unexported fields
}
IntervalTree is a structure used to make a calculation of running medians quick. The structure is described in the Section 8/Appendix of the paper.
func NewIntervalTree ¶
func NewIntervalTree(d int) *IntervalTree
NewIntervalTree creates a new IntervalTree of depth d.
func (*IntervalTree) Insert ¶
func (it *IntervalTree) Insert(v float64)
Insert puts an element in an interval tree.
func (*IntervalTree) Median ¶
func (it *IntervalTree) Median() float64
Median returns the current median.
func (*IntervalTree) NumElements ¶
func (it *IntervalTree) NumElements() int
NumElements returns the number of elements in the tree.
func (*IntervalTree) Remove ¶
func (it *IntervalTree) Remove(v float64)
Remove removes an element from an interview tree.