evaluate-data-frame.asciidoc 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --
  2. :api: evaluate-data-frame
  3. :request: EvaluateDataFrameRequest
  4. :response: EvaluateDataFrameResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Evaluate Data Frame API
  8. The Evaluate Data Frame API is used to evaluate an ML algorithm that ran on a {dataframe}.
  9. The API accepts an +{request}+ object and returns an +{response}+.
  10. [id="{upid}-{api}-request"]
  11. ==== Evaluate Data Frame Request
  12. ["source","java",subs="attributes,callouts,macros"]
  13. --------------------------------------------------
  14. include-tagged::{doc-tests-file}[{api}-request]
  15. --------------------------------------------------
  16. <1> Constructing a new evaluation request
  17. <2> Reference to an existing index
  18. <3> Kind of evaluation to perform
  19. <4> Name of the field in the index. Its value denotes the actual (i.e. ground truth) label for an example. Must be either true or false
  20. <5> Name of the field in the index. Its value denotes the probability (as per some ML algorithm) of the example being classified as positive
  21. <6> The remaining parameters are the metrics to be calculated based on the two fields described above.
  22. <7> https://en.wikipedia.org/wiki/Precision_and_recall[Precision] calculated at thresholds: 0.4, 0.5 and 0.6
  23. <8> https://en.wikipedia.org/wiki/Precision_and_recall[Recall] calculated at thresholds: 0.5 and 0.7
  24. <9> https://en.wikipedia.org/wiki/Confusion_matrix[Confusion matrix] calculated at threshold 0.5
  25. <10> https://en.wikipedia.org/wiki/Receiver_operating_characteristic#Area_under_the_curve[AuC ROC] calculated and the curve points returned
  26. include::../execution.asciidoc[]
  27. [id="{upid}-{api}-response"]
  28. ==== Response
  29. The returned +{response}+ contains the requested evaluation metrics.
  30. ["source","java",subs="attributes,callouts,macros"]
  31. --------------------------------------------------
  32. include-tagged::{doc-tests-file}[{api}-response]
  33. --------------------------------------------------
  34. <1> Fetching all the calculated metrics results
  35. <2> Fetching precision metric by name
  36. <3> Fetching precision at a given (0.4) threshold
  37. <4> Fetching confusion matrix metric by name
  38. <5> Fetching confusion matrix at a given (0.5) threshold