Skip to content

Commit 3bbd3a8

Browse files
authored
Merge pull request #78395 from diberry/0530-personalizer
[Cogsvcs] Personalizer - docs from private repo
2 parents 9c2286d + 051336a commit 3bbd3a8

File tree

4 files changed

+78
-4
lines changed

4 files changed

+78
-4
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
title: Active learning - Personalizer
3+
titleSuffix: Azure Cognitive Services
4+
description:
5+
services: cognitive-services
6+
author: edjez
7+
manager: nitinme
8+
ms.service: cognitive-services
9+
ms.subservice: personalizer
10+
ms.topic: overview
11+
ms.date: 05/30/2019
12+
ms.author: edjez
13+
---
14+
15+
# Active learning and learning policies
16+
17+
When your application calls the Rank API, you receive a rank of the content. Business logic can use this rank to determine if the content should be display to the user. When you display the ranked content, that is an _active_ rank event. When your application does not display that ranked content, that is an _inactive_ rank event.
18+
19+
Active rank event information is returned to Personalizer. This information is used to continue training the model through the current learning policy.
20+
21+
## Active events
22+
23+
Active events should always be shown to the user and the reward call should be returned to close the learning loop.
24+
25+
### Inactive events
26+
27+
Inactive events shouldn't change the underlying model because the user wasn't given a chance to choose from the ranked content.
28+
29+
## Don't train with inactive rank events
30+
31+
For some applications, you may need to call the Rank API without knowing yet if your application will display the results to the user.
32+
33+
This happens when:
34+
35+
* You may be pre-rendering some UI that the user may or may not get to see.
36+
* Your application may be doing predictive personalization in which Rank calls are made with less real-time context and their output may or may not be used by the application.
37+
38+
### Disable active learning for inactive rank events during Rank call
39+
40+
To disabling automatic learning, call Rank with `learningEnabled = False`.
41+
42+
Learning for an inactive event is implicitly activated if you send a reward for the Rank.
43+
44+
## Learning policies
45+
46+
Learning policy determines the specific *hyperparameters* of the model training. Two models of the same data, trained on different learning policies, will behave differently.
47+
48+
### Importing and exporting Learning Policies
49+
50+
You can import and export learning policy files from the Azure portal. This allows you to save existing policies, test them, replace them, and archive them in your source code control as artifacts for future reference and audit.
51+
52+
### Learning policy settings
53+
54+
The settings in the **Learning Policy** are not intended to be changed. Only change the settings when you understand how they impact Personalizer. Changing settings without this knowledge will cause side effects, including invalidating Personalizer models.
55+
56+
### Comparing effectiveness of learning policies
57+
58+
You can compare how different Learning Policies would have performed against past data in Personalizer logs by doing [offline evaluations](concepts-offline-evaluation.md).
59+
60+
[Upload your own Learning Policies](how-to-offline-evaluation.md) to compare with the current learning policy.
61+
62+
### Discovery of optimized learning policies
63+
64+
Personalizer can create a more optimized learning policy when doing an [offline evaluation](how-to-offline-evaluation.md).
65+
A more optimized learning policy, which is shown to have better rewards in an offline evaluation, will yield better results when used online in Personalizer.
66+
67+
After an optimized learning policy has been created, you can apply it directly to Personalizer so it replaces the current policy immediately, or you can save it for further evaluation and decide in the future whether to discard, save, or apply it later.

articles/cognitive-services/personalizer/csharp-quickstart-commandline-feedback-loop.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ Getting started with Personalizer involves the following steps:
3737

3838
## Change the model update frequency
3939

40-
In the Personalizer resource in the Azure portal, change the **Model update frequency** to 10 seconds. This will train the service rapidly, allowing you to see how the top action changes for each iteration
40+
In the Personalizer resource in the Azure portal, change the **Model update frequency** to 10 seconds. This will train the service rapidly, allowing you to see how the top action changes for each iteration.
41+
42+
When a Personalizer Loop is first instantiated, there is no model since there has been no Reward API calls to train from. Rank calls will return equal probabilities for each item. Your application should still always rank content using the output of RewardActionId.
4143

4244
![Change model update frequency](./media/settings/configure-model-update-frequency-settings.png)
4345

articles/cognitive-services/personalizer/how-to-settings.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ After changing this setting, make sure to select **Save**.
5959

6060
### Model update frequency
6161

62-
**Model update frequency** sets how often a new Personalizer model is retrained.
62+
The latest model, trained from Reward API calls from every active event, isn't automatically used by Personalizer Rank call. The **Model update frequency** sets how often the model used by the Rank call up updated.
63+
64+
High model update frequencies are useful for situations where you want to closely track changes in user behaviors. Examples include sites that run on live news, viral content, or live product bidding. You could use a 15-minute frequency in these scenarios. For most use cases, a lower update frequency is effective. One-minute update frequencies are useful when debugging an application's code using Personalizer, doing demos, or interactively testing machine learning aspects.
6365

6466
![Model update frequency sets how often a new Personalizer model is retrained.](media/settings/configure-model-update-frequency-settings.png)
6567

@@ -73,7 +75,7 @@ After changing this setting, make sure to select **Save**.
7375

7476
## Export the Personalizer model
7577

76-
From the Resource management's section for **Model and Policy**, review model creation and last updated date and export the current model.
78+
From the Resource management's section for **Model and Policy**, review model creation and last updated date and export the current model. You can use the Azure portal or the Personalizer APIs to export a model file for archival purposes.
7779

7880
![Export current Personalizer model](media/settings/export-current-personalizer-model.png)
7981

articles/cognitive-services/personalizer/toc.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
- name: "Features Action and Context"
2828
href: concepts-features.md
2929
displayName: action, context, feature, namespace, JSON, best practice, set
30+
- name: Active learning
31+
href: concept-active-learning.md
32+
displayName: active, inactive
3033
- name: Rewards
3134
href: concept-rewards.md
3235
displayName: reward, wait time, default reward
@@ -44,7 +47,7 @@
4447
items:
4548
- name: Create and configure Personalizer
4649
href: how-to-settings.md
47-
displayName: azure, portal, settings, evaluation, offline, policy
50+
displayName: azure, portal, settings, evaluation, offline, policy, export, model
4851
- name: Analyze
4952
items:
5053
- name: Offline evaluation

0 commit comments

Comments
 (0)