Skip to content

Commit

Permalink
update baysian image (#48)
Browse files Browse the repository at this point in the history
edit '\img\ch-data-science\bayesian-optimization-explained.svg'
  • Loading branch information
leverage-point authored May 12, 2024
1 parent a707913 commit bd70b57
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
16 changes: 8 additions & 8 deletions drawio/ch-data-science/bayesian-optimization-explained.drawio

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions drawio/ch-ray-train-tune/Rplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -264,21 +264,25 @@ df$y.uci <- NULL
df$y.uci[which(abs(df$xx-temp.df$x.uci)<0.01)] <- temp.df$y.uci

# other curves
x.o.1 <- seq(0, 8, 0.05)
x.o.1 <- seq(0, 8.2, 0.05)
y.o.1 <- splinefun(x=seq(0, 8, 1),
y=c(0, 0, 0, 0, 0, 0, 0, 0, 0))(x.o.1)

x.o.2 <- seq(8, 8.5, 0.05)
y.o.2 <- splinefun(x=c(8, 8.25, 8.5),
x.o.2 <- seq(8.2, 8.8, 0.05)
y.o.2 <- splinefun(x=c(8.2, 8.5, 8.8),
y=c(0, 1, 0))(x.o.2)

x.o.3 <- seq(8.5, 10, 0.05)
y.o.3 <- splinefun(x=c(8.5, 9, 9.5, 10),
x.o.3 <- seq(8.8, 10, 0.05)
y.o.3 <- splinefun(x=c(8.8, 9, 9.5, 10),
y=c(0, 0, 0, 0))(x.o.3)

temp.df <- data.frame(x.o=c(x.o.1, x.o.2, x.o.3),
y.o=c(y.o.1, y.o.2, y.o.3))
temp.df <- temp.df[!duplicated(temp.df$x.o), ]
# temp.df <- temp.df[!duplicated(temp.df$x.o), ]
diff_x <- diff(temp.df$x.o)
remove_rows <- which(diff_x < 0.01)
temp.df <- temp.df[-(remove_rows + 1), ]


df$y.o <- NULL
df$y.o[which(abs(df$xx-temp.df$x.o)<0.01)] <- temp.df$y.o
Expand Down
3 changes: 1 addition & 2 deletions img/ch-data-science/bayesian-optimization-explained.svg
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 bd70b57

Please sign in to comment.