window.mode

Unterstützt in:
window.mode(values)

Beschreibung

Gibt den Modus der Eingabewerte zurück. Wenn mehrere mögliche Moduswerte vorhanden sind, wird nur einer dieser Werte nicht deterministisch als Rückgabewert ausgewählt.

Parameterdatentypen

INT|FLOAT|STRING

Rückgabetyp

STRING

Codebeispiele

Beispiel 1

Den Modus der Werte im Abgleichszeitraum abrufen.

// 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