@@ -88,7 +88,8 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-classification
88
88
89
89
[source,js]
90
90
--------------------------------------------------
91
- {
91
+ "inference":{
92
+ "model_id":"my_model_id"
92
93
"inference_config": {
93
94
"regression": {
94
95
"results_field": "my_regression"
@@ -105,7 +106,8 @@ object.
105
106
106
107
[source,js]
107
108
--------------------------------------------------
108
- {
109
+ "inference":{
110
+ "model_id":"my_model_id"
109
111
"inference_config": {
110
112
"classification": {
111
113
"num_top_classes": 2,
@@ -123,14 +125,18 @@ categories for which the predicted probabilities are reported is 2
123
125
classes to the `probabilities` field. Both fields are contained in the
124
126
`target_field` results object.
125
127
128
+ Refer to the
129
+ {ml-docs}/ml-lang-ident.html#ml-lang-ident-example[language identification]
130
+ trained model documentation for a full example.
131
+
126
132
127
133
[discrete]
128
134
[[inference-processor-feature-importance]]
129
135
==== {feat-imp-cap} object mapping
130
136
131
- Update your index mapping of the {feat-imp} result field as you can see below to
132
- get the full benefit of aggregating and searching for
133
- {ml-docs}/ml-feature-importance.html[{ feat-imp}].
137
+ To get the full benefit of aggregating and searching for
138
+ {ml-docs}/ml-feature-importance.html[{feat-imp}], update your index mapping of
139
+ the { feat-imp} result field as you can see below:
134
140
135
141
[source,js]
136
142
--------------------------------------------------
@@ -149,14 +155,16 @@ get the full benefit of aggregating and searching for
149
155
--------------------------------------------------
150
156
// NOTCONSOLE
151
157
152
- The mapping field name for {feat-imp} is compounded as follows:
158
+ The mapping field name for {feat-imp} (in the example above, it is
159
+ `ml.inference.feature_importance`) is compounded as follows:
153
160
154
161
`<ml.inference.target_field>`.`<inference.tag>`.`feature_importance`
155
162
156
- If `inference.tag` is not provided in the processor definition, it is not part
157
- of the field path. The `<ml.inference.target_field>` defaults to `ml.inference`.
163
+ * `<ml.inference.target_field>`: defaults to `ml.inference`.
164
+ * `<inference.tag>`: if is not provided in the processor definition, then it is
165
+ not part of the field path.
158
166
159
- For example, you provide a tag `foo` in the definition as you can see below:
167
+ For example, if you provide a tag `foo` in the definition as you can see below:
160
168
161
169
[source,js]
162
170
--------------------------------------------------
@@ -168,10 +176,10 @@ For example, you provide a tag `foo` in the definition as you can see below:
168
176
// NOTCONSOLE
169
177
170
178
171
- The {feat-imp} value is written to the `ml.inference.foo.feature_importance`
172
- field.
179
+ Then, the {feat-imp} value is written to the
180
+ `ml.inference.foo.feature_importance` field.
173
181
174
- You can also specify a target field as follows:
182
+ You can also specify the target field as follows:
175
183
176
184
[source,js]
177
185
--------------------------------------------------
0 commit comments