Skip to content

Commit 3b803df

Browse files
Merge pull request #212129 from jcodella/patch-7
updated wording for inference explainability
2 parents 653328c + 2fc1f68 commit 3b803df

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

articles/cognitive-services/personalizer/concepts-features.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ JSON objects can include nested JSON objects and simple property/values. An arra
329329
```
330330

331331
## Inference Explainability
332-
Personalizer can help you to understand which features are the most and least influential when determining the best action. When enabled, inference explainability includes feature scores from the underlying model into the Rank API response, so your application receives this information at the time of inference.
332+
Personalizer can help you to understand which features of a chosen action are the most and least influential to then model during inference. When enabled, inference explainability includes feature scores from the underlying model into the Rank API response, so your application receives this information at the time of inference.
333333
Feature scores empower you to better understand the relationship between features and the decisions made by Personalizer. They can be used to provide insight to your end-users into why a particular recommendation was made, or to analyze whether your model is exhibiting bias toward or against certain contextual settings, users, and actions.
334334

335335
Setting the service configuration flag IsInferenceExplainabilityEnabled in your service configuration enables Personalizer to include feature values and weights in the Rank API response. To update your current service configuration, use the [Service Configuration – Update API](/rest/api/personalizer/1.1preview1/service-configuration/update?tabs=HTTP). In the JSON request body, include your current service configuration and add the additional entry: “IsInferenceExplainabilityEnabled”: true. If you don’t know your current service configuration, you can obtain it from the [Service Configuration – Get API](/rest/api/personalizer/1.1preview1/service-configuration/get?tabs=HTTP)
@@ -366,11 +366,11 @@ Enabling inference explainability will add a collection to the JSON response fro
366366
},
367367
{
368368
"id": "SportsArticle",
369-
"probability": 0
369+
"probability": 0.15
370370
},
371371
{
372372
"id": "NewsArticle",
373-
"probability": 0.2
373+
"probability": 0.05
374374
}
375375
],
376376
"eventId": "75269AD0-BFEE-4598-8196-C57383D38E10",
@@ -396,17 +396,19 @@ Enabling inference explainability will add a collection to the JSON response fro
396396
}
397397
```
398398

399-
Recall that Personalizer will either return the _best action_ as determined by the model or an _exploratory action_ chosen by the exploration policy. The best action is the one that the model has determined has the highest probability of maximizing the average reward, whereas exploratory actions are chosen among the set of all possible actions provided in the Rank API call. Actions taken during exploration do not leverage the feature scores in determining which action to take, therefore **feature scores for exploratory actions should not be used to gain an understanding of why the action was taken.** [You can learn more about exploration here](/azure/cognitive-services/personalizer/concepts-exploration).
399+
In the example above, three action IDs are returned in the _ranking_ collection along with their respective probabilities scores. The action with the largest probability is the_ best action_ as determined by the model trained on data sent to the Personalizer APIs, which in this case is `"id": "EntertainmentArticle"`. The action ID can be seen again in the _inferenceExplanation_ collection, along with the feature names and scores determined by the model for that action and the features and values sent to the Rank API.
400+
401+
Recall that Personalizer will either return the _best action_ or an _exploratory action_ chosen by the exploration policy. The best action is the one that the model has determined has the highest probability of maximizing the average reward, whereas exploratory actions are chosen among the set of all possible actions provided in the Rank API call. Actions taken during exploration do not leverage the feature scores in determining which action to take, therefore **feature scores for exploratory actions should not be used to gain an understanding of why the action was taken.** [You can learn more about exploration here](/azure/cognitive-services/personalizer/concepts-exploration).
400402

401403
For the best actions returned by Personalizer, the feature scores can provide general insight where:
402-
* Larger positive scores provide more support for the model choosing the best action.
403-
* Larger negative scores provide more support for the model not choosing the best action.
404-
* Scores close to zero have a small effect on the decision to choose the best action.
404+
* Larger positive scores provide more support for the model choosing this action.
405+
* Larger negative scores provide more support for the model not choosing this action.
406+
* Scores close to zero have a small effect on the decision to choose this action.
405407

406408
### Important considerations for Inference Explainability
407409
* **Increased latency.** Enabling _Inference Explainability_ will significantly increase the latency of Rank API calls due to processing of the feature information. Run experiments and measure the latency in your scenario to see if it satisfies your application’s latency requirements. Future versions of Inference Explainability will mitigate this issue.
408410
* **Correlated Features.** Features that are highly correlated with each other can reduce the utility of feature scores. For example, suppose Feature A is highly correlated with Feature B. It may be that Feature A’s score is a large positive value while Feature B’s score is a large negative value. In this case, the two features may effectively cancel each other out and have little to no impact on the model. While Personalizer is very robust to highly correlated features, when using _Inference Explainability_, ensure that features sent to Personalizer are not highly correlated
409-
411+
* **Default exploration only.** Currently, Inference Explainability supports only the default exploration algorithm. Future releases will enable the use of this capability with additional exploration algorithms.
410412

411413
## Next steps
412414

0 commit comments

Comments
 (0)