# NOT RUN {
#--- Deterministic D-Optimal Design ---#
# simple linear regression model
# design = c(x1,x2,p) (two point design with weight)
# }
# NOT RUN {
dc <- function(design) {
fisher_mat <- (1-design[3])*c(1,design[2]) %*% t(c(1,design[2]))
fisher_mat <- fisher_mat + design[3]*c(1,design[1]) %*% t(c(1,design[1]))
return(-log(det(fisher_mat)))
}
#optim_budget is small for demonstration purposes
my_result <- design_experiment(dc,
c(0,0.5,0),
c(0.5,1,1),
FALSE,
optim_budget = 2)
#- optimal design -#
print(my_result$experiment)
#- optimization report - #
print(my_result$optimization)
#- final gp model -#
print(my_result$gp)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab