Skip to content

Commit 01a6784

Browse files
committed
Add evaluation metrics descriptions
1 parent 04e40c1 commit 01a6784

File tree

1 file changed

+45
-23
lines changed

1 file changed

+45
-23
lines changed

docs/reference/ml/df-analytics/apis/evaluate-dfanalytics.asciidoc

+45-23
Original file line numberDiff line numberDiff line change
@@ -42,31 +42,32 @@ result field to be present.
4242
[[ml-evaluate-dfanalytics-request-body]]
4343
==== {api-request-body-title}
4444

45+
`index`::
46+
(Required, object) Defines the `index` in which the evaluation will be
47+
performed.
48+
49+
`query`::
50+
(Optional, object) A query clause that retrieves a subset of data from the
51+
source index. See <<query-dsl>>.
52+
4553
`evaluation`::
46-
(Required, object) Defines the type of evaluation you want to perform. The
47-
value of this object can be different depending on the type of evaluation you
48-
want to perform. See <<ml-evaluate-dfanalytics-resources>>.
54+
(Required, object) Defines the type of evaluation you want to perform.
55+
See <<ml-evaluate-dfanalytics-resources>>.
4956
+
5057
--
5158
Available evaluation types:
59+
5260
* `binary_soft_classification`
5361
* `regression`
5462
* `classification`
55-
--
5663

57-
`index`::
58-
(Required, object) Defines the `index` in which the evaluation will be
59-
performed.
60-
61-
`query`::
62-
(Optional, object) A query clause that retrieves a subset of data from the
63-
source index. See <<query-dsl>>.
64+
--
6465

6566
[[ml-evaluate-dfanalytics-resources]]
6667
==== {dfanalytics-cap} evaluation resources
6768

6869
[[binary-sc-resources]]
69-
===== Binary soft classification configuration objects
70+
===== Binary soft classification evaluation objects
7071

7172
Binary soft classification evaluates the results of an analysis which outputs
7273
the probability that each document belongs to a certain class. For example, in
@@ -87,20 +88,20 @@ document is an outlier.
8788
(Optional, object) Specifies the metrics that are used for the evaluation.
8889
Available metrics:
8990

90-
`auc_roc`::
91+
`auc_roc`:::
9192
(Optional, object) The AUC ROC (area under the curve of the receiver
9293
operating characteristic) score and optionally the curve. Default value is
9394
{"includes_curve": false}.
9495

95-
`precision`::
96+
`precision`:::
9697
(Optional, object) Set the different thresholds of the {olscore} at where
9798
the metric is calculated. Default value is {"at": [0.25, 0.50, 0.75]}.
9899

99-
`recall`::
100+
`recall`:::
100101
(Optional, object) Set the different thresholds of the {olscore} at where
101102
the metric is calculated. Default value is {"at": [0.25, 0.50, 0.75]}.
102103

103-
`confusion_matrix`::
104+
`confusion_matrix`:::
104105
(Optional, object) Set the different thresholds of the {olscore} at where
105106
the metrics (`tp` - true positive, `fp` - false positive, `tn` - true
106107
negative, `fn` - false negative) are calculated. Default value is
@@ -122,9 +123,18 @@ which outputs a prediction of values.
122123
in other words the results of the {regression} analysis.
123124

124125
`metrics`::
125-
(Required, object) Specifies the metrics that are used for the evaluation.
126-
Available metrics are `r_squared` and `mean_squared_error`.
127-
126+
(Optional, object) Specifies the metrics that are used for the evaluation.
127+
Available metrics:
128+
129+
`mean_squared_error`:::
130+
(Optional, object) Average squared difference between the predicted values and the actual (`ground truth`) value.
131+
Read more on https://en.wikipedia.org/wiki/Mean_squared_error[Wikipedia]
132+
133+
`r_squared`:::
134+
(Optional, object) Proportion of the variance in the dependent variable that is predictable from the independent variables.
135+
Read more on https://en.wikipedia.org/wiki/Coefficient_of_determination[Wikipedia]
136+
137+
128138

129139
[[classification-evaluation-resources]]
130140
==== {classification-cap} evaluation objects
@@ -134,8 +144,8 @@ outputs a prediction that identifies to which of the classes each document
134144
belongs.
135145

136146
`actual_field`::
137-
(Required, string) The field of the `index` which contains the ground truth.
138-
The data type of this field must be keyword.
147+
(Required, string) The field of the `index` which contains the `ground truth`.
148+
The data type of this field must be categorical.
139149

140150
`predicted_field`::
141151
(Required, string) The field in the `index` that contains the predicted value,
@@ -146,8 +156,20 @@ belongs.
146156
example, `predicted_field` : `ml.animal_class_prediction.keyword`.
147157

148158
`metrics`::
149-
(Required, object) Specifies the metrics that are used for the evaluation.
150-
Available metric is `multiclass_confusion_matrix`.
159+
(Optional, object) Specifies the metrics that are used for the evaluation.
160+
Available metrics:
161+
162+
`accuracy`:::
163+
(Optional, object) Accuracy of predictions (per-class and overall)
164+
165+
`precision`:::
166+
(Optional, object) Precision of predictions (per-class and average)
167+
168+
`recall`:::
169+
(Optional, object) Recall of predictions (per-class and average)
170+
171+
`multiclass_confusion_matrix`:::
172+
(Optional, object) Multiclass confusion matrix
151173

152174

153175
////

0 commit comments

Comments
 (0)