The ZPATTERNDETECTION function will detect patterns in a Geo Time Series™. The patterns it is able to detect are those extracted by the ZPATTERNS or PATTERNS functions.

The ZPATTERNDETECTION does not standardize the datapoints in the sliding window, assuming (wrongly) they already are.

The following constraints are enforced:

  • pattern length must divide window size
  • quantization scale must be a power of two from 2 to 65536
  • ZPATTERNDETECTION can only be applied to numeric Geo Time Series™ which are bucketized and filled (i.e. no bucket with missing values).
  • the patterns to detect must have been extracted with the same quantization scale and pattern length, the window size can be different.
ZPATTERNDETECTION is available since version 1.0.13.

See also



// Create a new GTS and bucketize it NEWGTS 1 720 <% DUP 2 * PI * 360 / COS NaN NaN NaN 4 ROLL ADDVALUE %> FOR [ SWAP bucketizer.last 720 1 0 ] BUCKETIZE 0 GET DUP 32 8 16 ZPATTERNS VALUES // List of patterns 16 // Window size 8 // Pattern length 16 // Quantization scale ZPATTERNDETECTION