Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewGhazi committed Jun 30, 2024
1 parent 12c0c00 commit 55d2860
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
16 changes: 6 additions & 10 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ knitr::opts_chunk$set(
<!-- badges: start -->
<!-- badges: end -->

This is the package I use to optimize my coffee brewing with [Bayesian Optimization](https://www.youtube.com/watch?v=wZODGJzKmD0)
This is the package I use to optimize my coffee brewing with [Bayesian Optimization](https://www.youtube.com/watch?v=wZODGJzKmD0).

## Installation

Expand All @@ -39,20 +39,16 @@ remotes::install_github('andrewGhazi/dyingforacup', type = "source")

## Example

Give the `run_gp()` function a data frame of brew parameters with an
Give the `suggest_next()` function a data frame of brew parameters with ratings and it will suggest a point to try next that has high predicted probability of improving the rating.

```{r eval=FALSE}
library(dyingforacup)
dat = tibble::tribble(
~grinder_setting, ~temp, ~bloom_time, ~rating,
# 8, 193, 25, 1.1,
7, 195, 20, -.7,
9, 179, 45, -1,
9, 195, 25, -.5,
)
dat = data.frame(grinder_setting = c(8, 193, 25),
temp = c(7, 195, 20),
bloom_time = c(9, 179, 45),
rating = c(1.1, -.7, -1))
suggest_next(dat,
iter_sampling = 4000,
Expand Down
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COFFEE?!](https://www.youtube.com/watch?v=RJC9DXQAd7U)
<!-- badges: end -->

This is the package I use to optimize my coffee brewing with [Bayesian
Optimization](https://www.youtube.com/watch?v=wZODGJzKmD0)
Optimization](https://www.youtube.com/watch?v=wZODGJzKmD0).

## Installation

Expand All @@ -31,15 +31,23 @@ remotes::install_github('andrewGhazi/dyingforacup', type = "source")

## Example

Give the `run_gp()` function a data frame of brew parameters with an
Give the `suggest_next()` function a data frame of brew parameters with
ratings and it will suggest a point to try next that has high predicted
probability of improving the rating.

``` r
library(dyingforacup)

dat = data.frame(grinder_setting = c(8, 193, 25),
temp = c(7, 195, 20),
bloom_time = c(9, 179, 45),
rating = c(1.1, -.7, -1))

run_gp(dat)
dat = data.frame(grinder_setting = c(8, 193, 25),
temp = c(7, 195, 20),
bloom_time = c(9, 179, 45),
rating = c(1.1, -.7, -1))

suggest_next(dat,
iter_sampling = 4000,
refresh = 1250,
show_exceptions = FALSE,
adapt_delta = .95,
parallel_chains = 4)
```

0 comments on commit 55d2860

Please sign in to comment.