window.least_common_number

Supported in:
window.least_common_number( numbers, number_of_least_common_values)

Description

Returns the specified number of least common int or float in the input values. A maximum of 1000 values can be extracted.

Param data types

INT|FLOAT, INT

Return type

ARRAY_FLOATS

Code samples

// This rule sets the outcome $least_common_values to the least common int or float in the input values
// in the 5 minute match window.
events:
 $e.user.userid = $userid
match:
 $userid over 5m
outcome:
  $least_common_values = window.least_common_number($e.target.asset.location.region_latitude, 3) // Returns 35.227087,37.422407 and 32.715738 for given latitudes: 37.422407, 40.712775, 40.712775, 40.712775, 32.715738, 35.227087, 32.715738