1
0

dfanalyticsresources.asciidoc 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. `dest`::
  40. (object) The destination configuration of the analysis. The `index` property
  41. (string) is the name of the index in which to store the results of the
  42. {dfanalytics-job}. The `results_field` (string) property defines the name of
  43. the field in which to store the results of the analysis. The default value is
  44. `ml`.
  45. `id`::
  46. (string) The unique identifier for the {dfanalytics-job}. This identifier can
  47. contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and
  48. underscores. It must start and end with alphanumeric characters. This property
  49. is informational; you cannot change the identifier for existing jobs.
  50. `model_memory_limit`::
  51. (string) The approximate maximum amount of memory resources that are
  52. permitted for analytical processing. The default value for {dfanalytics-jobs}
  53. is `1gb`. If your `elasticsearch.yml` file contains an
  54. `xpack.ml.max_model_memory_limit` setting, an error occurs when you try to
  55. create {dfanalytics-jobs} that have `model_memory_limit` values greater than
  56. that setting. For more information, see <<ml-settings>>.
  57. `source`::
  58. (object) The source configuration, consisting of `index` (array) which is an
  59. array of index names on which to perform the analysis. It can be a single
  60. index or index pattern as well as an array of indices or patterns. Optionally,
  61. `source` can have a `query` (object) property. The {es} query domain-specific
  62. language (DSL). This value corresponds to the query object in an {es} search
  63. POST body. All the options that are supported by {es} can be used, as this
  64. object is passed verbatim to {es}. By default, this property has the following
  65. value: `{"match_all": {}}`.
  66. [[dfanalytics-types]]
  67. ==== Analysis objects
  68. {dfanalytics-cap} resources contain `analysis` objects. For example, when you
  69. create a {dfanalytics-job}, you must define the type of analysis it performs.
  70. Currently, `outlier_detection` is the only available type of analysis, however,
  71. other types will be added, for example `regression`.
  72. [discrete]
  73. [[oldetection-resources]]
  74. ==== {oldetection-cap} configuration objects
  75. An {oldetection} configuration object has the following properties:
  76. `n_neighbors`::
  77. (integer) Defines the value for how many nearest neighbors each method of
  78. {oldetection} will use to calculate its {olscore}. When the value is
  79. not set, the system will dynamically detect an appropriate value.
  80. `method`::
  81. (string) Sets the method that {oldetection} uses. If the method is not set
  82. {oldetection} uses an ensemble of different methods and normalises and
  83. combines their individual {olscores} to obtain the overall {olscore}. We
  84. recommend to use the ensemble method. Available methods are `lof`, `ldof`,
  85. `distance_kth_nn`, `distance_knn`.
  86. `feature_influence_threshold`::
  87. (double) The minimum {olscore} that a document needs to have in order to
  88. calculate its {fiscore}.
  89. Value range: 0-1 (`0.1` by default).