Loading

QUANTIZE


gts
Since v1.0.0
Available on all platforms
See also

The QUANTIZE function produces a quantized version of a Geo Time Series™ by replacing each value with a value from a finite list according to the interval the original value falls in. This function only works on numeric Geo Time Series™. This function can help to "discretify" data before calling VALUEHISTOGRAM. The list of intervals is defined as: [-∞,bounds0], (bounds0,bounds_1], (bounds1,bounds2], ..., (boundsn-1,+∞]

Signature

Examples

NEWGTS 1 100 <% 'i' STORE $i NaN NaN NaN $i ADDVALUE %> FOR 10 50 2 LBOUNDS // Values <= 10 will be changed to 'below' // Values > 50 will be changed to 'above' // Values between 11 and 30 will be changed to '1' // Values between 31 and 50 will be changed to '2' [ 'below' '1' '2' 'above' ] QUANTIZE