MatchPattern: Check if a Template Pattern Matches a Timeseries

Description Usage Arguments Value References

Description

Returns TRUE the template pattern matches the timeseries (by passing a threshold for Spearman's Rank Correlation Coefficient). This function only considers the y value (i.e. not the time intervals) for matching purposes. It is assumed that the timeseries covers a similar length of time as the pattern.template. Returns FALSE if the variance of the timeseries parameter is 0, since cor.test(..., method="spearman") cannot handle that.

Usage

1
MatchPattern(timeseries, pattern.template, threshold = 0.7)

Arguments

timeseries

The xts time series to be checked agains the pattern.template to see if it exhibits the pattern. Must have the same number of points as the pattern.template

pattern.template

An xts time series representation of a pattern. Must have the same number of points as the timeseries.

threshold

The threshold for the spearman's rho. Default is arbitrarily set to 0.7

Value

TRUE if the spearman ranking correlation coefficient is higher than the set threshold.

References

Zhe Zhang, Jian Jiang, Xiaoyan Liu, Ricky Lau, Huaiqing Wang, and Rui Zhang. A real time hybrid pattern matching scheme for stock time series. In Proceedings of the Twenty-First Australasian Conference on Database Technologies - Volume 104, ADC ’10, pages 161–170, Darlinghurst, Australia, Australia, 2010. Australian Computer Society, Inc.


joshmarsh/TSPatternQuery documentation built on May 19, 2019, 8:53 p.m.