window.mode

以下でサポートされています。
window.mode(values)

説明

入力値の最頻値を返します。モード値の候補が複数ある場合、そのうちの 1 つの値が非決定論的に選択され、戻り値として返されます。

パラメータのデータ型

INT|FLOAT|STRING

戻り値の型

STRING

コードサンプル

例 1

一致ウィンドウ内の値のモードを取得します。

// This rule sets the outcome $size_mode to the most frequently occurring
// file size in the 5 minute match window.
events:
 $e.user.userid = $userid
match:
 $userid over 5m
outcome:
  $size_mode = window.mode($e.file.size) // yields 1.6 if the event file size values in the match window are 1.6, 2, and 1.6