Skip to content

Commit 39cd6db

Browse files
szabostevetveasey
andauthored
[DOCS] Adds note to time_of_week function about how values are calculated (#87871) (#87909)
Co-authored-by: Tom Veasey <[email protected]>
1 parent bbdd836 commit 39cd6db

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

docs/reference/ml/anomaly-detection/functions/ml-time-functions.asciidoc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
= Time functions
33

44
The time functions detect events that happen at unusual times, either of the day
5-
or of the week. These functions can be used to find unusual patterns of behavior,
6-
typically associated with suspicious user activity.
5+
or of the week. These functions can be used to find unusual patterns of
6+
behavior, typically associated with suspicious user activity.
77

88
The {ml-features} include the following time functions:
99

@@ -77,6 +77,12 @@ its past behavior.
7777
The `time_of_week` function detects when events occur that are outside normal
7878
usage patterns. For example, it detects login events on the weekend.
7979

80+
IMPORTANT: The `time_of_week` function models time in epoch seconds modulo the
81+
duration of a week in seconds. It means that the `typical` and `actual` values
82+
are seconds after a whole number of weeks since 1/1/1970 in UTC which is a
83+
Thursday. For example, a value of `475` is 475 seconds after midnight on
84+
Thursday in UTC.
85+
8086
This function supports the following properties:
8187

8288
* `by_field_name` (optional)
@@ -102,3 +108,5 @@ models when events occur throughout the week for each `eventcode`. It detects
102108
when a workstation event occurs at an unusual time during the week for that
103109
`eventcode` compared to other workstations. It detects events for a
104110
particular workstation that are outside the normal usage pattern.
111+
112+

0 commit comments

Comments
 (0)