oph_aggregate_stats_partial

Description

Behaviour

It computes partial results useful to compute a statistical index based on mask value working vertically on the columns of arrays of measures. The partial results, after a merge, can be treated as input to oph_aggregate_stats_final primitive to compute the final results for the requested indexes. Possible partial results, depending on the requested indexes, are:

  • sum{i}: number of operands;
  • sum{xi}: sum of operands;
  • sum{xi2}: sum of squared operands;
  • sum{xi3}: sum of operands raised to 3;
  • sum{xi4}: sum of operands raised to 4;
  • max{xi}: maximum value between operands;
  • min{xi}: minimum value between operands.

For example, in case the 3-order moment (skew) is requested, the output will contain sum{i}, sum{xi}, sum{xi2} and sum{xi3}.

Parameters

  • input measure type: Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’; ‘oph_long’; ‘oph_int’; ‘oph_short’; ‘oph_byte’.
  • output measure type: Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’; ‘oph_long’; ‘oph_int’; ‘oph_short’; ‘oph_byte’.
  • measure: input measure.
  • mask: 7-bit mask
    • 0000000: invalid
    • 1xxxxxx: mean
    • x1xxxxx: variance
    • xx1xxxx: std dev
    • xxx1xxx: skew
    • xxxx1xx: excess kurtosis
    • xxxxx1x: max
    • xxxxxx1: min
    • 1111111: all (default)
    • 101: mean + std dev
    • ...

Return type

Binary-array.

Examples

Compute partial results for mean, maximum and minimum of a set of time series.

oph_aggregate_stats_partial('OPH_DOUBLE','OPH_DOUBLE',measure,'1000011')

Operation type

Aggregate.

Arguments

Argument name Type Mandatory Values Default Min/Max-value Min/Max-times
input data type “oph_type” “yes” “‘oph_double’|’oph_float’|’oph_int’|’oph_long’|’oph_short’|’oph_byte’”     “1” / “1”
output data type “oph_type” “yes” “‘oph_double’|’oph_float’|’oph_int’|’oph_long’|’oph_short’|’oph_byte’”     “1” / “1”
measure “binary-array” “yes”       “1” / “1”
mask “string” “no”   “1111111”   “0” / “1”