Code Monkey home page Code Monkey logo

gpareto's Introduction

GPareto

GPareto: Gaussian Processes for Pareto Front Estimation and Optimization

This R package provides tools for multi-objective optimization of expensive black-box functions along with estimation of Pareto fronts.

Installation

For the stable version: http://cran.r-project.org/package=GPareto

This the development version, contributions are welcomed.

Note: roxygen is used for the documentation

gpareto's People

Contributors

mbinois avatar vpicheny avatar

Stargazers

 avatar Jiangyan Zhao avatar  avatar Dawei Zhan avatar  avatar Srikanth K S avatar Min-seok avatar  avatar Tung N avatar Nick avatar Hongyuan Jia avatar David Salinas avatar Hongren Gong avatar Vincent Terrasi avatar mb706 avatar Xiangyun Huang avatar

Watchers

Emanuele Cordano avatar  avatar  avatar  avatar

gpareto's Issues

Can the estimated variance of a Kriging model be set to 0?

Hi,

I want to apply the EGO algorithm to an application with two objectives using the EHI criterion. One objective is obtained via simulation, the other one can be computed deterministically from the inputs. In this scenario, the forumla for computing the EHI simplifies (since we know the value for the deterministic objective exactly, which basically makes the two-dimensional predictive distribution one-dimensional). However, many parts of your code would remain unchanged. I wonder if it would be sufficient if I set the deterministic relationship between the inputs and one of the outputs to be the trend of the related Kriging model and set the model’s variance to 0. Do you think this would work with the way the two-dimensional integral is computed in the package?

I messed a bit around with this idea and encountered a case where there’s a positive EHI for a dominated point, where both model variances have been set to 0 (the EHI should be 0 as well then). However, I’m struggling to find a minimal example that demonstrates this behavior.

Thanks in advance for your ideas on how to deal with this problem!
Dominik

Error: package or namespace load failed for ‘GPareto’ in readRDS(nsInfoFilePath): unknown input format

> library(GPareto)
载入需要的程辑包:DiceKriging
载入需要的程辑包:emoa
Error: package or namespace load failed for ‘GPareto’ in readRDS(nsInfoFilePath):
 unknown input format

> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936  LC_CTYPE=Chinese (Simplified)_China.936    LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C                               LC_TIME=Chinese (Simplified)_China.936    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] emoa_0.5-0.1      DiceKriging_1.6.0 mco_1.15.6       

loaded via a namespace (and not attached):
[1] compiler_4.1.0       parallel_4.1.0       tools_4.1.0          scatterplot3d_0.3-41 fortunes_1.5-4

Lower and upper bounds not respected during initial optimization - easyGParetoptim

I've noticed that the lower and upper bounds supplied to easyGParetoptim are not used to constrain the values of the design.init. I will show what I mean below.

These are my initial parameters. As a reminder, also here are the default values for the function

Default: easyGParetoptim <- function (fn, ..., cheapfn = NULL, budget, lower, upper, par=NULL, value=NULL, noise.var=NULL,
                             control=list(method="SMS", trace=1, inneroptim="pso", maxit=100, seed=42), ncores = 1){}

budget = 100
lower = c(65,0.1)
upper = c(90,0.8)
par=NULL
value=NULL
noise.var=NULL
control=list(method="EMI", trace=1, inneroptim="genoud", maxit=1000) 

I then run part of the source code of easyGParetoptim

if (is.null(control$method)) control$method <- "SMS"
if (is.null(control$trace)) control$trace   <- 2
if (is.null(control$inneroptim))  control$inneroptim <- "pso"
if (is.null(control$maxit)) control$maxit   <- 100
if (is.null(control$seed)) control$seed   <- 42
if (is.null(control$refPoint)) control$refPoint   <- NULL
if (is.null(control$distance)) control$distance <- "euclidean"
if (is.null(control$threshold)) control$threshold <- 1e-5

fn <- match.fun(fn)
d <- length(lower)

if (length(lower) != length(upper)) {
  cat("Bound values lower and upper are not consistent. Both should be vectors of size d.")
  return(NULL)
}

if (!is.null(par)) {
  design.init <- data.frame(x=par) #, ncol=d, byrow=TRUE)
  temp <- dim(design.init)
  
  if (temp[2] != d) {
    cat("Bound values (lower and upper) and initial DOE (par) are not consistent. \n 
          lower and upper should be vectors of size d and \n 
          par either a matrix with d columns or a data frame of d variables.")
    return(NULL)
  }
  n.init <- temp[1]
} else {
  n.init <- max(4*d, round(budget/3))
  design.init <- data.frame(x=lower + (upper-lower)*DiceDesign::maximinESE_LHS(DiceDesign::lhsDesign(n.init, d, seed=control$seed)$design)$design)
}

What I am not understanding is the creation of design.init here. When I run this code with my defined parameters, I get the following for design.init, which is static because seed is always set to be 42. Columns x.1 and x.2 are assumed to be my two parameters, because design.init is then passed to my objective function in the next line of code (below the table here). However, this is a problem because my first parameter explicitly has a bound of c(65,90) yet column x.1 clearly has values <65. Similarly, my second parameter has a bound of c(0.1, 0.8), yet column x.2 has values > 1. When assessing these initial parameterizations, my objective function retains some of these as non-dominated.

Why are these values not constrained before passing to the objective function?

> design.init
          x.1        x.2
1  76.0696149  0.7520375
2   0.2557608 65.7280784
3  77.3340059  0.6126351
4   0.7398423 84.4342816
5  69.5949453  0.2773338
6   0.6285544 72.5977526
7  79.3049338  0.1493053
8   0.1248087 73.4183675
9  66.5796924  0.5959640
10  0.6830319 80.3900229
11 73.7310628  0.4823795
12  0.5123566 70.8080097
13 69.1522000  0.4302356
14  0.3092646 74.5609400
15 74.4982630  0.1315125
16  0.7790235 71.8889383
17 88.5575520  0.1847647
18  0.4735411 79.7223573
19 65.4108017  0.4688411
20  0.5393849 85.4675627
21 67.8367963  0.1901771
22  0.3303910 84.8791331
23 84.1389482  0.7066988
24  0.5742660 81.9111539
25 84.7424132  0.2106277
26  0.5467893 89.6698700
27 74.9198954  0.2440800
28  0.5890101 77.1533511
29 87.3886594  0.7786323
30  0.4221897 75.4763149
31 71.0771012  0.5658727
32  0.6995055 75.7199320
33 68.2537388  0.7323445

if (!is.null(par) && !is.null(value)) {
  obs.init <- as.matrix(value)
  if (nrow(obs.init) != n.init) {
    cat("Initial DOE (par) and objective (value) are not consistent.")
    return(NULL)
  }
} else {
  obs.init <- apply(design.init, 1, fn)
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.