Advanced Example: Abnormal Dips in User Traffic using 3 Dimensionsedit

Again, building on the previous example we could try to enhance the model accuracy, ie lower loss, and forecast the user traffic based on additional features:

  • Past user traffic, using past values as a proxy to guess the future values
  • Active users count at a given time
  • The click through rate, ie CTR, as measured in social media campaigns

The features list becomes a dictionary with 3 optional lists, i, o, and io respectively for input, output, and input-output features:

  • Two dimensions will be used to ingest input data in the model, and therefore are declared in the i features list
  • One dimension, the user traffic, is both an input and the expected output therefore it is declared in the io features list

Effectively, the following file gives you a model to forecast and detect anomalies in user traffic as a function of past user traffic, past active users, and past click through rate in advertising campaigns.

An updated user_traffic.json file (Or .yml file if YAML format is used) will become:

  "name": "traffic-model",
  "seasonality": {
      "daytime": true,
      "weekday": true
  "bucket_interval": "1m",
  "default_datasource": "my-datasource",
  "features": {
    "io": [{
      "default": 0,
      "metric": "count",
      "field": "requests",
      "measurement": "traffic",
      "name": "count_all_requests",
      "anomaly_type": "low"
    "i": [
      "default": 0,
      "metric": "max",
      "field": "active_users",
      "measurement": "traffic",
      "name": "max_users"
      "default": 0,
      "metric": "mean",
      "field": "click_through_rate",
      "measurement": "social",
      "name": "avg_ctr"
  "interval": 60,
  "max_evals": 10,
  "offset": 30,
  "forecast": 5,
  "span": 20,
  "max_threshold": 90,
  "min_threshold": 50,
  "type": "timeseries"