Manage special events
Special events like Christmas and temporary sales can have a big impact on the metric you want to monitor. To avoid false positive and reduce alerts fatigue, some detectors can learn the effect of special events.
Events are provided by ThirdEye and passed to the detector downstream. Events can be ingested in ThirdEye via the API or with Google calendars in the server configuration.
Detectors compatible with event impact learning:
- ETS (Enterprise only)
StarTree templates that use the above detectors are compatible with event impact learning. By default, such templates don't learn from events. A specific configuration is required.
Here is an example of learning the impact of Netherlands holidays using the startree-ets
template.
Make sure you have StarTree templates installed and up to date.
The template assumes Netherlands Google calendar holidays are loaded into ThirdEye.
Configuration:
{
"name": "metric_in_netherlands_ets",
"description": "Metric in netherlands dection using ets with holiday learning",
"template": {
"name": "startree-ets"
},
"templateProperties": {
"dataSource": "yourDatasource",
"dataset": "yourDataset",
"aggregationFunction": "sum",
"aggregationColumn": "netherlands_metric",
"monitoringGranularity": "P1D",
"sensitivity": "3",
"seasonalityPeriod": "P7D",
"lookback": "P365D",
"eventTypes": [],
"eventSqlFilter": "'NL' member of dimensionMap['countryCode']"
},
"cron": "0 15 19 1/1 * ? *"
}
Notes:
lookback
is set to one year. This allows the model to learn the effect of a yearly event like Christmas day for the next Christmas day.eventTypes
is set to empty list. This means no specific filter is applied on events and all events are fetched at first. If not set, the template default value is["__NO_EVENTS"]
, and has the effect of not learning from events.eventSqlFilter
: is used to only fetch Netherlands events. It is important to use this filter. If all events in the ThirdEye database are passed, the model will most likely not be able to train, failing at runtime or overfitting. See EventFetcher for more info about filtering.