Getting bounds for the expected values from ML

Hello

See this ML example from Elastic documentation :

I'm creating my own custom viz mixing data with ml results from .ml-anomalies-* index.

I would like to retireve the bounds for all the expected values (the shaded blue area in the graph) but this data is not present in the .ml-anomalies-* index.

I suppose this data is the lower_confidence_bound and upper_confidence_bound from the API results :

      "anomaly_score_explanation": {
        "single_bucket_impact": 193,
        "lower_confidence_bound": 8.674171626102172,
        "typical_value": 32.943037418742556,
        "upper_confidence_bound": 58.357583586337846,
        "by_field_relative_rarity": 1
      }

But :

  • it is not an index so I can't use it in my viz
  • the values are only given when anomaly occurs, I would like to get data for all buckets

These data are certainly internal to the model but I prefer to ask the question to be sure about that ! Thanks.

Regards

Argh!!! My bad! In my last job, I forgot to enable this option :

"model_plot_config": {
"enabled": "true"
},

1 Like

Thanks for sharing your solution, @gueri.