dfanalyticsresources.asciidoc 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ml-dfanalytics-resources]]
  4. === {dfanalytics-cap} job resources
  5. {dfanalytics-cap} resources relate to APIs such as <<put-dfanalytics>> and
  6. <<get-dfanalytics>>.
  7. [discrete]
  8. [[ml-dfanalytics-properties]]
  9. ==== {api-definitions-title}
  10. `analysis`::
  11. (object) The type of analysis that is performed on the `source`. For example:
  12. `outlier_detection`. For more information, see <<dfanalytics-types>>.
  13. `analyzed_fields`::
  14. (object) You can specify both `includes` and/or `excludes` patterns. If
  15. `analyzed_fields` is not set, only the relevant fields will be included. For
  16. example all the numeric fields for {oldetection}.
  17. [source,js]
  18. --------------------------------------------------
  19. PUT _ml/data_frame/analytics/loganalytics
  20. {
  21. "source": {
  22. "index": "logdata"
  23. },
  24. "dest": {
  25. "index": "logdata_out"
  26. },
  27. "analysis": {
  28. "outlier_detection": {
  29. }
  30. },
  31. "analyzed_fields": {
  32. "includes": [ "request.bytes", "response.counts.error" ],
  33. "excludes": [ "source.geo" ]
  34. }
  35. }
  36. --------------------------------------------------
  37. // CONSOLE
  38. // TEST[setup:setup_logdata]
  39. `description`::
  40. (Optional, string) A description of the job.
  41. `dest`::
  42. (object) The destination configuration of the analysis. The `index` property
  43. (string) is the name of the index in which to store the results of the
  44. {dfanalytics-job}. The `results_field` (string) property defines the name of
  45. the field in which to store the results of the analysis. The default value is
  46. `ml`.
  47. `id`::
  48. (string) The unique identifier for the {dfanalytics-job}. This identifier can
  49. contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and
  50. underscores. It must start and end with alphanumeric characters. This property
  51. is informational; you cannot change the identifier for existing jobs.
  52. `model_memory_limit`::
  53. (string) The approximate maximum amount of memory resources that are
  54. permitted for analytical processing. The default value for {dfanalytics-jobs}
  55. is `1gb`. If your `elasticsearch.yml` file contains an
  56. `xpack.ml.max_model_memory_limit` setting, an error occurs when you try to
  57. create {dfanalytics-jobs} that have `model_memory_limit` values greater than
  58. that setting. For more information, see <<ml-settings>>.
  59. `source`::
  60. (object) The source configuration, consisting of `index` (array) which is an
  61. array of index names on which to perform the analysis. It can be a single
  62. index or index pattern as well as an array of indices or patterns. Optionally,
  63. `source` can have a `query` (object) property. The {es} query domain-specific
  64. language (DSL). This value corresponds to the query object in an {es} search
  65. POST body. All the options that are supported by {es} can be used, as this
  66. object is passed verbatim to {es}. By default, this property has the following
  67. value: `{"match_all": {}}`.
  68. [[dfanalytics-types]]
  69. ==== Analysis objects
  70. {dfanalytics-cap} resources contain `analysis` objects. For example, when you
  71. create a {dfanalytics-job}, you must define the type of analysis it performs.
  72. Currently, `outlier_detection` is the only available type of analysis, however,
  73. other types will be added, for example `regression`.
  74. [discrete]
  75. [[oldetection-resources]]
  76. ==== {oldetection-cap} configuration objects
  77. An {oldetection} configuration object has the following properties:
  78. `n_neighbors`::
  79. (integer) Defines the value for how many nearest neighbors each method of
  80. {oldetection} will use to calculate its {olscore}. When the value is
  81. not set, the system will dynamically detect an appropriate value.
  82. `method`::
  83. (string) Sets the method that {oldetection} uses. If the method is not set
  84. {oldetection} uses an ensemble of different methods and normalises and
  85. combines their individual {olscores} to obtain the overall {olscore}. We
  86. recommend to use the ensemble method. Available methods are `lof`, `ldof`,
  87. `distance_kth_nn`, `distance_knn`.
  88. `feature_influence_threshold`::
  89. (double) The minimum {olscore} that a document needs to have in order to
  90. calculate its {fiscore}.
  91. Value range: 0-1 (`0.1` by default).