diff --git a/examples/BasicBandit.jsx b/examples/BasicBandit.jsx index b862d16..e699a11 100644 --- a/examples/BasicBandit.jsx +++ b/examples/BasicBandit.jsx @@ -59,7 +59,11 @@ function BasicFruitBandit() {

Keep eating apples, and rejecting the other options, and see how - quickly the bandit learns your preference: + quickly the bandit learns your preference.{" "} +

+

+ Then switch to preferring oranges, and see how quick the bandit + adapts.

{recommendation && ( diff --git a/examples/ContextBandit.jsx b/examples/ContextBandit.jsx index aea07e8..255cb7c 100644 --- a/examples/ContextBandit.jsx +++ b/examples/ContextBandit.jsx @@ -95,30 +95,31 @@ function ContextFruitBandit() { return (

Context dependent recommendations

-

- The bandit can learn the interaction between the context (sunny or - rainy) and the fruit or treat preferences. -

-

Feature and interaction toggles

-

- If you switch off the context interaction toggles, the recommendations - will no longer depend on the weather. -

-

- If you switch off the actionIdFeatures and contextActionIdInteractions, - the recommendations will no longer depend on the specific actionId - ('apple, 'pear', etc), but the probabilities will be the same for all - fruits and all treats. -

-

- If you switch off all toggles, all actionIds get the same score and so - the same probability. -

-

- Each time you change a toggle, the bandit gets reinstantiated and - retrained on the existing training data. You can see the newly fitted - coefficients in the JSON serialized bandit. -

+

Context

+

+ After each recommendation we get a new random context/weather (sunny or + rainy). +

+

+ You can also click the button to generate a new random context/weather, + and see how that affects the recommendations. +

+
+ {context?.sunny == 1 ? "sunny" : "rainy"} +
{" "} -
{context?.sunny == 1 ? "sunny" : "rainy"}

Food recommendation

@@ -217,6 +228,10 @@ function ContextFruitBandit() { it's rainy. Then see how fast the algorithm learns your context dependent preference.

+

+ Then switch on and off the toggles to see how that affects the + recommendations. +

{" "} {recommendation && (