Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewGhazi committed Aug 3, 2024
1 parent 26294bb commit 7238fc5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
12 changes: 7 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ There's a lot going on in that animation. This explains each panel:
* light grey lines: posterior draws for the relationship from the GP
* grey ribbon: 90% predictive interval of a new coffee brewed at the given setting
* red arrow & dashed line: the previous best observation shifted down by a set amount (`offset`, the length of the red arrow).
* 2nd panel, blue function: fit sd, the sd of the light grey lines
* 2nd panel, blue function: fit sd, the sd of the light grey lines (which is not the same thing as the width of the grey ribbon)
* 3rd panel, red function: expected improvement: the expectation value of a new coffee at the given setting falling above the dashed red line.
* bottom pane, green function: the acquisition function, a weighted mixture of the two curves above. `lambda * blue + (1-lambda) * red = green`
* orange diamond: maximum point on the acquisition function = next suggested point
Expand All @@ -93,10 +93,10 @@ dat = data.frame(grinder_setting = c( 8, 7, 9),
rating = c(1.1, -0.7, -1))
suggest_next(dat,
iter_sampling = 1000,
refresh = 0,
offset = .33,
lambda = .1,
lambda = .1, # exploration parameters
offset = .33,
iter_sampling = 1000, # sampler parameters
refresh = 100,
show_exceptions = FALSE,
parallel_chains = 4)
```
Expand All @@ -115,6 +115,8 @@ $suggested
```
This returns a list of MCMC draws, the acquisition function values over a grid of brew parameters, and a suggestion on where to go next. `offset` and `lambda` can be tweaked to control exploration vs exploitation, but expect to be suggested some combinations that result in really bad coffee sometimes (especially early on before it has collapsed the uncertainty along the outer edges of the parameter space). See `?suggest_next` for more detail on these function arguments and more.

Once you have a grid point to try, use `suggest_tune()` to get a coffee-related song to listen to while you brew!

## TODO list

Easy:
Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ There’s a lot going on in that animation. This explains each panel:
- red arrow & dashed line: the previous best observation shifted down
by a set amount (`offset`, the length of the red arrow).
- 2nd panel, blue function: fit sd, the sd of the light grey lines
(which is not the same thing as the width of the grey ribbon)
- 3rd panel, red function: expected improvement: the expectation value
of a new coffee at the given setting falling above the dashed red
line.
Expand Down Expand Up @@ -123,10 +124,10 @@ dat = data.frame(grinder_setting = c( 8, 7, 9),
rating = c(1.1, -0.7, -1))

suggest_next(dat,
iter_sampling = 1000,
refresh = 0,
offset = .33,
lambda = .1,
lambda = .1, # exploration parameters
offset = .33,
iter_sampling = 1000, # sampler parameters
refresh = 100,
show_exceptions = FALSE,
parallel_chains = 4)
```
Expand All @@ -146,8 +147,13 @@ This returns a list of MCMC draws, the acquisition function values over
a grid of brew parameters, and a suggestion on where to go next.
`offset` and `lambda` can be tweaked to control exploration vs
exploitation, but expect to be suggested some combinations that result
in really bad coffee sometimes. See `?suggest_next` for more detail on
these function arguments and more.
in really bad coffee sometimes (especially early on before it has
collapsed the uncertainty along the outer edges of the parameter space).
See `?suggest_next` for more detail on these function arguments and
more.

Once you have a grid point to try, use `suggest_tune()` to get a
coffee-related song to listen to while you brew!

## TODO list

Expand Down
Binary file modified man/figures/out2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7238fc5

Please sign in to comment.