Description Usage Arguments Examples
MOOVaR
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | MOOVaR(
X,
Y,
sens = rep("max", NCOL(Y)),
quantile_utility_idx = rep(TRUE, NCOL(Y)),
optim_method = c("real_ind", "nsga", "none"),
g = NULL,
X_space_csrt = FALSE,
tau = rep(0.5, NCOL(Y)),
globale_tau = rep(F, NCOL(Y)),
alpha = 0.15,
updateProgress = NULL,
path_tracking = NULL,
mutation_method = "simple",
allowed_dependence = matrix(TRUE, nrow = NCOL(X) - 1, ncol = NCOL(Y)),
seed_R2 = NULL,
...
)
|
X |
matrix or data.frame of n observation of the decision variable of size d. |
Y |
matrix or data.frame of n observation of the p objectifs. |
sens |
vector of size p containing either "max" (by default) or "min" to choose how to optimize each objectif. |
quantile_utility_idx |
vector of size p containing boolean to choose the utility method. TRUE and therefore quantile method is used by default. |
g |
list of constraint given as function of X. NULL by default |
X_space_csrt |
boolean to choose either a constraint should be added to check if each solution belongs to the decision space. |
tau |
vector of size p containing the risk in ]0,1[ of each objectif. |
globale_tau |
vector of size p boolean indicating either the objectif risk must ne manage with other. |
alpha |
probability to deal with the trade-off false positive false negatif. Only if X_space_csrt=TRUE. |
updateProgress |
function to follow the progression of the running function |
path_tracking |
path where to write the step of the running function. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | library(tidyverse)
library(MOOVaR)
set.seed(12)
n <- 300
# X quanti ----
# X
d1 = 3
mini <- rep(x = -2, times = d1)
maxi <- rep(x = 2, times = d1)
X1 <- sapply(seq_len(d1), function(k){
runif(n = n, min = mini[k], max = maxi[k])
}) %>% as.data.frame()
colnames(X1) = paste0("X", seq_len(d1))
X = X1
#calcul des Y selon une relation lineaire + du bruit
p = 4
fn = lapply(seq_len(p), function(j){
beta = runif(n = d1, min = -2, max = 2)
function(X) {
as.matrix(X) %*% beta
}
})
names(fn) = paste0("Y", seq_len(p))
Y = lapply(fn, function(f){
f(X) + rnorm(n)
}) %>% as.data.frame(row.names = seq_len(n))
g_cstr = list(
function(x){
x = as.data.frame(x)
x[,1] + x[,2] + x[,3] < 2
}
)
res = MOOVaR(X, Y,
sens = rep("max", NCOL(Y)),
quantile_utility_idx = c(T,T,T,F),
tau = rep(0.2, p),
globale_tau = c(F, T, T, F),
g = g_cstr,
X_space_csrt=T, TT = 10)
plot(res)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.