From d3ad9fe632985fb15dd9be5a2d0b4d95fee030df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Tue, 5 Jan 2021 09:42:06 +0100 Subject: [PATCH] [DOCS] Improves inference processor linking and docs (#66119) --- .../ingest/processors/inference.asciidoc | 32 ++++++++++++------- .../apis/ml-df-analytics-apis.asciidoc | 6 ++++ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/docs/reference/ingest/processors/inference.asciidoc b/docs/reference/ingest/processors/inference.asciidoc index f6bd774f561d8..bc08c512e8621 100644 --- a/docs/reference/ingest/processors/inference.asciidoc +++ b/docs/reference/ingest/processors/inference.asciidoc @@ -88,7 +88,8 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-classification [source,js] -------------------------------------------------- -{ +"inference":{ + "model_id":"my_model_id" "inference_config": { "regression": { "results_field": "my_regression" @@ -105,7 +106,8 @@ object. [source,js] -------------------------------------------------- -{ +"inference":{ + "model_id":"my_model_id" "inference_config": { "classification": { "num_top_classes": 2, @@ -123,14 +125,18 @@ categories for which the predicted probabilities are reported is 2 classes to the `probabilities` field. Both fields are contained in the `target_field` results object. +Refer to the +{ml-docs}/ml-lang-ident.html#ml-lang-ident-example[language identification] +trained model documentation for a full example. + [discrete] [[inference-processor-feature-importance]] ==== {feat-imp-cap} object mapping -Update your index mapping of the {feat-imp} result field as you can see below to -get the full benefit of aggregating and searching for -{ml-docs}/ml-feature-importance.html[{feat-imp}]. +To get the full benefit of aggregating and searching for +{ml-docs}/ml-feature-importance.html[{feat-imp}], update your index mapping of +the {feat-imp} result field as you can see below: [source,js] -------------------------------------------------- @@ -149,14 +155,16 @@ get the full benefit of aggregating and searching for -------------------------------------------------- // NOTCONSOLE -The mapping field name for {feat-imp} is compounded as follows: +The mapping field name for {feat-imp} (in the example above, it is +`ml.inference.feature_importance`) is compounded as follows: ``.``.`feature_importance` -If `inference.tag` is not provided in the processor definition, it is not part -of the field path. The `` defaults to `ml.inference`. +* ``: defaults to `ml.inference`. +* ``: if is not provided in the processor definition, then it is +not part of the field path. -For example, you provide a tag `foo` in the definition as you can see below: +For example, if you provide a tag `foo` in the definition as you can see below: [source,js] -------------------------------------------------- @@ -168,10 +176,10 @@ For example, you provide a tag `foo` in the definition as you can see below: // NOTCONSOLE -The {feat-imp} value is written to the `ml.inference.foo.feature_importance` -field. +Then, the {feat-imp} value is written to the +`ml.inference.foo.feature_importance` field. -You can also specify a target field as follows: +You can also specify the target field as follows: [source,js] -------------------------------------------------- diff --git a/docs/reference/ml/df-analytics/apis/ml-df-analytics-apis.asciidoc b/docs/reference/ml/df-analytics/apis/ml-df-analytics-apis.asciidoc index 6597c2ae84100..dae8757275ee4 100644 --- a/docs/reference/ml/df-analytics/apis/ml-df-analytics-apis.asciidoc +++ b/docs/reference/ml/df-analytics/apis/ml-df-analytics-apis.asciidoc @@ -23,5 +23,11 @@ You can use the following APIs to perform {infer} operations. * <> * <> +You can deploy a trained model to make predictions in an ingest pipeline or in +an aggregation. Refer to the following documentation to learn more. + +* <> +* <> + See also <>.