estimate-model-memory.asciidoc 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --
  2. :api: estimate-model-memory
  3. :request: EstimateModelMemoryRequest
  4. :response: EstimateModelMemoryResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Estimate {anomaly-job} model memory API
  9. Estimate the model memory an analysis config is likely to need for
  10. the given cardinality of the fields it references.
  11. [id="{upid}-{api}-request"]
  12. ==== Estimate {anomaly-job} model memory request
  13. A +{request}+ can be set up as follows:
  14. ["source","java",subs="attributes,callouts,macros"]
  15. --------------------------------------------------
  16. include-tagged::{doc-tests-file}[{api}-request]
  17. --------------------------------------------------
  18. <1> Pass an `AnalysisConfig` to the constructor.
  19. <2> For any `by_field_name`, `over_field_name` or
  20. `partition_field_name` fields referenced by the
  21. detectors, supply overall cardinality estimates
  22. in a `Map`.
  23. <3> For any `influencers`, supply a `Map` containing
  24. estimates of the highest cardinality expected in
  25. any single bucket.
  26. include::../execution.asciidoc[]
  27. [id="{upid}-{api}-response"]
  28. ==== Estimate {anomaly-job} model memory response
  29. The returned +{response}+ contains the model memory estimate:
  30. ["source","java",subs="attributes,callouts,macros"]
  31. --------------------------------------------------
  32. include-tagged::{doc-tests-file}[{api}-response]
  33. --------------------------------------------------
  34. <1> The model memory estimate.