Description Usage Arguments Details Value Examples
Turn your bayesBandit object into an API and serve/update requests through HTTP.
1 | deployBandit(bandit, port = 8000)
|
bandit |
a bayesBandit object |
port |
port to deploy on |
deployBandit
turns a Bayesian bandit into a JSON API that accepts curl requests. Two of the five methods of
bayesBandit classes are exposed: serveRecipe
and setResults
. Assuming the API is deployed on localhost
this is an
example of how it would be hit:
curl http://localhost:8000/serveRecipe
curl --data '{"A":[1, 0, 1, 1], "B":[0, 0, 0, 1]}' http://localhost:8000/setResults
An active http
process on some port.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.