-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d97634
commit e3421ab
Showing
50 changed files
with
264 additions
and
3,658 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
Package: EPBO | ||
Title: Bayesian Optimization via Exact Penalty | ||
Version: 0.0.11 | ||
Date: 2023-11-20 | ||
Version: 0.1.0 | ||
Date: 2023-12-14 | ||
Authors@R: | ||
person(given = "Jiangyan", | ||
family = "Zhao", | ||
email = "[email protected]", | ||
role = c("aut", "cre")) | ||
Description: Wrapper routines for blackbox optimization under mixed equality and inequality | ||
constraints via an exact penalty. | ||
Description: Wrapper routines for blackbox optimization under mixed (equality and/or inequality) | ||
constraints via exact penalty. | ||
License: AGPL (>= 3) | ||
URL: https://github.com/Jiangyan-Zhao/EPBO | ||
BugReports: https://github.com/Jiangyan-Zhao/EPBO/issues | ||
Encoding: UTF-8 | ||
LazyData: true | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.2.3 | ||
Imports: laGP, tgp, DiceKriging, matrixStats, mvtnorm | ||
Imports: laGP, tgp | ||
Depends: R (>= 2.14) | ||
Suggests: | ||
stats, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,18 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(AF_AE) | ||
export(AF_ConVar) | ||
export(AF_EY) | ||
export(AF_EY_Kernel) | ||
export(AF_LCB) | ||
export(AF_OOSS) | ||
export(AF_ScaledEI) | ||
export(AF_ScaledEI_Kernel) | ||
export(AF_ScaledEI_MC) | ||
export(AF_TS) | ||
export(AF_UEI) | ||
export(AF_UEI_Kernel) | ||
export(AF_UEI_MC) | ||
export(AF_VEI) | ||
export(bilog) | ||
export(normalize) | ||
export(optim.AE) | ||
export(optim.BM) | ||
export(optim.EP) | ||
export(optim.EP.MC) | ||
export(optim.EP.kernel) | ||
export(optim.EP4HD) | ||
export(unbilog) | ||
export(unnormalize) | ||
import(DiceKriging) | ||
import(laGP) | ||
import(matrixStats) | ||
import(tgp) | ||
importFrom(graphics,image) | ||
importFrom(graphics,par) | ||
importFrom(graphics,points) | ||
importFrom(stats,dnorm) | ||
importFrom(stats,median) | ||
importFrom(stats,optim) | ||
importFrom(stats,pnorm) | ||
importFrom(stats,quantile) | ||
importFrom(stats,rnorm) | ||
importFrom(stats,runif) | ||
importFrom(stats,sd) | ||
importFrom(utils,tail) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ | |
#' \item{C }{ \code{matrix} giving the value of the constraint function for the input under consideration at each trial} | ||
#' \item{X }{ \code{matrix} giving the input values at which the blackbox function was evaluated } | ||
#' | ||
#' @seealso \code{\link[laGP]{optim.auglag}}, \code{\link[laGP]{optim.efi}}, \code{\link[EPBO]{optim.BM}}, \code{\link[EPBO]{optim.EP}} | ||
#' @seealso \code{\link[laGP]{optim.auglag}}, \code{\link[laGP]{optim.efi}}, \code{\link[EPBO]{optim.BM}}, \code{\link[EPBO]{optim.EP}} | ||
#' | ||
#' @author Jiangyan Zhao \email{[email protected]} | ||
#' | ||
|
@@ -68,10 +68,9 @@ | |
#' | ||
#' @examples | ||
#' # search space | ||
#' B = rbind(c(-2.25, 2.5), c(-2.25, 1.75)) | ||
#' B = rbind(c(-2.25, 2.5), c(-2.5, 1.75)) | ||
#' # Objective and constraint function for use | ||
#' MTP = function(x, B=rbind(c(-2.25, 2.5), c(-2.5, 1.75))){ | ||
#' x = pmin(pmax(B[,1], x), B[,2]) | ||
#' MTP = function(x){ | ||
#' f = -(cos((x[1]-0.1)*x[2]))^2 - x[1]*sin(3*x[1]+x[2]) | ||
#' t = atan2(x[1], x[2]) | ||
#' c = x[1]^2 + x[2]^2 -((2*cos(t)-1/2*cos(2*t)-1/4*cos(3*t)-1/8*cos(4*t))^2) - ((2*sin(t))^2) | ||
|
@@ -84,14 +83,13 @@ | |
#' AE$xbest | ||
|
||
|
||
optim.AE = function(blackbox, B, | ||
start=10, end=100, | ||
Xstart=NULL, urate=10, | ||
ncandf=function(k) { k }, | ||
alpha1=1, alpha2=5, omega=2/3, | ||
dg.start=c(0.1,1e-6), ab=c(3/2,8), | ||
dlim=sqrt(ncol(B))*c(1/100,10), | ||
verb=2, ...){ | ||
optim.AE = function( | ||
blackbox, B, start=10, end=100, | ||
Xstart=NULL, urate=10, ncandf=function(k) { k }, | ||
alpha1=1, alpha2=5, omega=2/3, | ||
dg.start=c(0.1,1e-6), ab=c(3/2,8), dlim=sqrt(ncol(B))*c(1/100,10), | ||
verb=2, ...) | ||
{ | ||
## check start | ||
if(start >= end) stop("must have start < end") | ||
## get initial design | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,21 @@ | ||
#' @title Asymmetric Entropy | ||
#' @title Asymmetric entropy acquisition function | ||
#' | ||
#' @description Asymmetric Entropy | ||
#' @description The asymmetric entropy (AE) acquisition function of the AE method | ||
#' | ||
#' @param x description | ||
#' @param x a vector containing a single candidate point; or a \code{matrix} with | ||
#' multiple candidate points | ||
#' @param fgpi the GP surrogate model of the objective function | ||
#' @param fnorm the maximum of the objective | ||
#' @param Cgpi the GP surrogate models of the constraints | ||
#' @param Cnorm the maxima of the constraints | ||
#' @param fmin the best objective value obtained so far | ||
#' @param alpha1 a specified weight for the EI part | ||
#' @param alpha2 a specified weight for the AE part | ||
#' @param omega a mode location parameter | ||
#' | ||
#' @param fgpi description | ||
#' @returns The AE value(s) at \code{x}. | ||
#' | ||
#' @param fnorm description | ||
#' | ||
#' @param Cgpi description | ||
#' | ||
#' @param Cnorm description | ||
#' | ||
#' @param fmin description | ||
#' | ||
#' @param alpha1 description | ||
#' | ||
#' @param alpha2 description | ||
#' | ||
#' @param omega description | ||
#' | ||
#' @returns AF | ||
#' @seealso \code{\link[EPBO]{AF_ScaledEI}}, \code{\link[EPBO]{AF_EY}}, \code{\link[EPBO]{AF_OOSS}} | ||
#' | ||
#' @author Jiangyan Zhao \email{[email protected]} | ||
#' | ||
|
@@ -31,15 +26,7 @@ | |
#' @importFrom stats dnorm | ||
#' @importFrom stats pnorm | ||
#' @importFrom stats quantile | ||
#' | ||
#' | ||
#' | ||
#' @export | ||
#' | ||
#' @examples | ||
#' B = rbind(c(0, 1), c(0, 1)) | ||
#' | ||
#' | ||
|
||
|
||
AF_AE = function(x, fgpi, fnorm, Cgpi, Cnorm, fmin, | ||
alpha1=1, alpha2=5, omega=2/3) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,28 @@ | ||
#' @title Predictive mean acquisition function | ||
#' | ||
#' @description Predictive mean | ||
#' | ||
#' @param x description | ||
#' | ||
#' @param fgpi description | ||
#' | ||
#' @param fmean description | ||
#' | ||
#' @param fsd description | ||
#' | ||
#' @param Cgpi description | ||
#' | ||
#' @param rho description | ||
#' | ||
#' @description The predictive mean acquisition function of the EPBO method | ||
#' | ||
#' @param x a vector containing a single candidate point; or a \code{matrix} with | ||
#' multiple candidate points | ||
#' @param fgpi the GP surrogate model of the objective function | ||
#' @param fmean the mean of the objective value | ||
#' @param fsd the standard deviation of the objective value | ||
#' @param Cgpi the GP surrogate models of the constraints | ||
#' @param rho the penalty parameters | ||
#' @param equal an optional vector containing zeros and ones, whose length equals the number of | ||
#' constraints, specifying which should be treated as equality constraints (\code{1}) and | ||
#' which as inequality (\code{0}) | ||
#' | ||
#' @returns The Predictive Mean at \code{x}. | ||
#' | ||
#' @returns AF | ||
#' @seealso \code{\link[EPBO]{AF_ScaledEI}}, \code{\link[EPBO]{AF_OOSS}}, \code{\link[EPBO]{AF_AE}} | ||
#' | ||
#' @author Jiangyan Zhao \email{[email protected]} | ||
#' | ||
#' | ||
#' @import laGP | ||
#' @importFrom stats dnorm | ||
#' @importFrom stats pnorm | ||
#' | ||
#' | ||
#' @export | ||
#' | ||
#' @examples | ||
#' B = rbind(c(0, 1), c(0, 1)) | ||
#' | ||
#' | ||
|
||
|
||
AF_EY = function(x, fgpi, fmean, fsd, Cgpi, rho, equal) | ||
{ | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.