evaluateresources.asciidoc 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ml-evaluate-dfanalytics-resources]]
  4. === {dfanalytics-cap} evaluation resources
  5. Evaluation configuration objects relate to the <<evaluate-dfanalytics>>.
  6. [discrete]
  7. [[ml-evaluate-dfanalytics-properties]]
  8. ==== {api-definitions-title}
  9. `evaluation`::
  10. (object) Defines the type of evaluation you want to perform. The value of this
  11. object can be different depending on the type of evaluation you want to
  12. perform.
  13. +
  14. --
  15. Available evaluation types:
  16. * `binary_soft_classification`
  17. * `regression`
  18. * `classification`
  19. --
  20. `query`::
  21. (object) A query clause that retrieves a subset of data from the source index.
  22. See <<query-dsl>>. The evaluation only applies to those documents of the index
  23. that match the query.
  24. [[binary-sc-resources]]
  25. ==== Binary soft classification configuration objects
  26. Binary soft classification evaluates the results of an analysis which outputs
  27. the probability that each document belongs to a certain class. For
  28. example, in the context of outlier detection, the analysis outputs the
  29. probability whether each document is an outlier.
  30. [discrete]
  31. [[binary-sc-resources-properties]]
  32. ===== {api-definitions-title}
  33. `actual_field`::
  34. (string) The field of the `index` which contains the `ground truth`.
  35. The data type of this field can be boolean or integer. If the data type is
  36. integer, the value has to be either `0` (false) or `1` (true).
  37. `predicted_probability_field`::
  38. (string) The field of the `index` that defines the probability of
  39. whether the item belongs to the class in question or not. It's the field that
  40. contains the results of the analysis.
  41. `metrics`::
  42. (object) Specifies the metrics that are used for the evaluation.
  43. Available metrics:
  44. `auc_roc`::
  45. (object) The AUC ROC (area under the curve of the receiver operating
  46. characteristic) score and optionally the curve.
  47. Default value is {"includes_curve": false}.
  48. `precision`::
  49. (object) Set the different thresholds of the {olscore} at where the metric
  50. is calculated.
  51. Default value is {"at": [0.25, 0.50, 0.75]}.
  52. `recall`::
  53. (object) Set the different thresholds of the {olscore} at where the metric
  54. is calculated.
  55. Default value is {"at": [0.25, 0.50, 0.75]}.
  56. `confusion_matrix`::
  57. (object) Set the different thresholds of the {olscore} at where the metrics
  58. (`tp` - true positive, `fp` - false positive, `tn` - true negative, `fn` -
  59. false negative) are calculated.
  60. Default value is {"at": [0.25, 0.50, 0.75]}.
  61. [[regression-evaluation-resources]]
  62. ==== {regression-cap} evaluation objects
  63. {regression-cap} evaluation evaluates the results of a {regression} analysis
  64. which outputs a prediction of values.
  65. [discrete]
  66. [[regression-evaluation-resources-properties]]
  67. ===== {api-definitions-title}
  68. `actual_field`::
  69. (string) The field of the `index` which contains the `ground truth`. The data
  70. type of this field must be numerical.
  71. `predicted_field`::
  72. (string) The field in the `index` that contains the predicted value,
  73. in other words the results of the {regression} analysis.
  74. `metrics`::
  75. (object) Specifies the metrics that are used for the evaluation. Available
  76. metrics are `r_squared` and `mean_squared_error`.
  77. [[classification-evaluation-resources]]
  78. ==== {classification-cap} evaluation objects
  79. {classification-cap} evaluation evaluates the results of a {classanalysis} which
  80. outputs a prediction that identifies to which of the classes each document
  81. belongs.
  82. [discrete]
  83. [[classification-evaluation-resources-properties]]
  84. ===== {api-definitions-title}
  85. `actual_field`::
  86. (string) The field of the `index` which contains the ground truth. The data
  87. type of this field must be keyword.
  88. `metrics`::
  89. (object) Specifies the metrics that are used for the evaluation. Available
  90. metric is `multiclass_confusion_matrix`.
  91. `predicted_field`::
  92. (string) The field in the `index` that contains the predicted value, in other
  93. words the results of the {classanalysis}. The data type of this field is
  94. string. You need to add `.keyword` to the predicted field name (the name you
  95. put in the {classanalysis} object as `prediction_field_name` or the default
  96. value of the same field if you didn't specified explicitly). For example,
  97. `predicted_field` : `ml.animal_class_prediction.keyword`.