From 55d2860f4ef1683bbefe01bddf8efa38a01a9a2e Mon Sep 17 00:00:00 2001 From: Andrew Ghazi <6763470+andrewGhazi@users.noreply.github.com> Date: Sun, 30 Jun 2024 13:31:12 -0400 Subject: [PATCH] update readme --- README.Rmd | 16 ++++++---------- README.md | 22 +++++++++++++++------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/README.Rmd b/README.Rmd index 1ea5f20..70394c3 100644 --- a/README.Rmd +++ b/README.Rmd @@ -20,7 +20,7 @@ knitr::opts_chunk$set( -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 @@ -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, diff --git a/README.md b/README.md index 52d6c72..a821076 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ COFFEE?!](https://www.youtube.com/watch?v=RJC9DXQAd7U) 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 @@ -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) ```