Skip to contents

Function for conducting joint propagation of probability, imprecise probability and possibilisty distributions (or intervals) using IRS (Baudrit et al., 2006) or hybrid method (Guyonnet et al., 2003).

Usage

propag(N, input, FUN, choice_opt="L-BFGS-B", param_opt = NULL, 
       mode = "IRS", corr = 0.01, NL = 10, sampler = "lhs", return.rr = FALSE)

Arguments

N

Integer corresponding to the number of random samples. Depending on the type of sampler used, this number shoudl be on the order of several hundreds.

input

List of inputs as provided by the function CREATE_INPUT().

FUN

Model assessment function.

choice_opt

Option for the constrainted optimization algorithm:

  • "L-BFGS-B": Limited-memory BFGS based on optimr package.

  • "L-BFGS-B_MULTI": Limited-memory BFGS with multiple starts.

  • "GENOUD": genetic algorithm plus derivative optimizer based on rgenoud package, see Mebane & Sekhon (2011).

param_opt

Parameters needed by the optimization algorithm:

  • If "L-BFGS-B": param_opt=NULL.

  • If "L-BFGS-B_MULTI": param_opt specifies the number of multi starts (e.g. 10).

  • If "GENOUD": param_opt specifies vector of paramters (population size, maxixmum of generations, solution tolerance), see Mebane & Sekhon (2011).

mode

Type of hybrid uncertainty propagation:

  • "IRS" Independent Random Sampling of Baudrit et al. (2007).

  • "HYBRID" Hybrid propagation described by Baudrit et al. (2006).

corr

Tolerance to avoid empty alpha-cuts. By default, corr=0.01.

NL

Integer to specify the number of alpha-cuts needed for hybrid propagation described by Baudrit et al. (2006). By default, NL=10.

sampler

Type of random sampler used. Three options are available either Latin Hypercube Design (lhs) developed by MacKay et al. (1979), or Space-Filling Designs based on Strauss process (strauss) as investigated by Franco et al. (2008), or original sampler or R (base). By default, sampler="lhs".

return.r

Logical to return the random values generated to sample the inputs. For advanced users.

Details

Value

Matrix Z0 of 2 rows and N columns (for IRS mode) or NxNL (for HYBRID mode). This corresponds to the set of random intervals (row Number 1: lower bound; row Number 2: upper bound), which can be summarized in different forms, see Baudrit et al. (2006). If return.r == TRUE the output is a list of two elements: Z corresponding to the matrix defined above, and the random values r used to sample the inputs.

References

  • Baudrit, C., Dubois, D., & Guyonnet, D. 2006. Joint propagation and exploitation of probabilistic and possibilistic information in risk assessment. IEEE transactions on fuzzy systems, 14(5), 593-608.

  • Baudrit, C., Guyonnet, D., Dubois, D. 2007. Joint propagation of variability and partial ignorance in a groundwater risk assessment. Journal of Contaminant Hydrology, 93: 72-84.

  • Franco, F., Bay, X., Corre, B., Dupuy, D. 2008. Planification d'experiences numeriques a partir du processus ponctuel de Strauss, https://hal.science/hal-00260701/fr/.

  • Mebane, W., Jr. and Sekhon, J. S. 2011. Genetic Optimization Using Derivatives: The rgenoud package for R. Journal of Statistical Software, 42(11): 1-26.

  • McKay M., Conover W. and Beckman R. 1979. A comparison of three methods for selecting values of input variables in the analysis of output from a computer code, Technometrics, 21, 2, 239-245.

  • Pedroni, N., Zio, E., Ferrario, E., Pasanisi, A., & Couplet, M. 2013. Hierarchical propagation of probabilistic and non-probabilistic uncertainty in the parameters of a risk model. Computers & Structures, 126, 199-213.

  • Sch\"obi, R., Sudret, B. 2016. Uncertainty propagation of p-boxes using sparse polynomial chaos expansions, https://arxiv.org/pdf/1608.05565.pdf

Examples

if (FALSE) {

#################################################
#### EXAMPLE 1 of Dubois & Guyonnet (2011)
#### Probability and Possibility distributions
#################################################

#### Model function
FUN = function(X){
  UER = X[1]
  EF = X[2]
  I = X[3]
  C = X[4]
  ED = X[5]
  return(UER*I*C*EF*ED/(70*70*365))
}

ninput = 5 #Number of input parameters
input = vector(mode = "list", length = ninput) # Initialisation

input[[1]] = create_input(
    name = "UER",
    type = "possi",
    distr = "triangle",
    param = c(2.e-2, 5.7e-2, 1.e-1),
    monoton = "incr"
    )
input[[2]] = create_input(
    name = "EF",
    type = "possi",
    distr = "triangle",
    param = c(200, 250, 350),
    monoton = "incr"
    )
input[[3]] = create_input(
    name = "I",
    type="possi",
    distr="triangle",
    param=c(1,1.5,2.5),
    monoton="incr"
    )
input[[4]] = create_input(
    name = "C",
    type = "proba",
    distr = "triangle",
    param = c(5e-3, 20e-3, 10e-3)
    )
input[[5]] = create_input(
    name = "ED",
    type = "proba",
    distr = "triangle",
    param = c(10, 50, 30)
    )

####CREATION OF THE DISTRIBUTIONS ASSOCIATED TO THE PARAMETERS
input = create_distr(input)

####VISU INPUT
plot_input(input)

#################################################
#### PROPAGATION

#OPTIMZATION CHOICES
choice_opt = NULL #no optimization needed
param_opt = NULL

#PROPAGATION RUN
Z0_IRS = propag(N = 1000, input, FUN, choice_opt, param_opt, mode = "IRS")
Z0_HYBRID = propag(N = 250,input, FUN, choice_opt, param_opt, mode = "HYBRID")

#################################################
#### POST-PROCESSING

# VISU - PROPAGATION
plot_cdf(Z0_IRS, xlab = "Z", ylab = "CDF", main = "EX 1", lwd = 1.5)
plot_cdf(Z0_HYBRID, new = FALSE, color1 = 3, color2 = 4, lwd = 1.5)

#################################################
#### EXAMPLE 2 of Schobi & Sudret (2016)
#### Imprecise Probability distributions
#################################################

#### Model function
FUN = function(X){
  A = X[1]
  B = X[2]
  return(100*(B-A^2)^2+(1-A)^2)
}

ninput<-6 #Number of input parameters
input<-vector(mode="list", length=ninput) # Initialisation

# Imprecise normal probability 
# whose parameters are described by the 3rd and 5th parameters
input[[1]] = create_input(
    name = "A",
    type = "impr proba",
    distr = "normal",
    param = c(3, 5),
    monoton = "dunno"
    )

# Imprecise normal probability
# whose parameters are described by the 4th and 6th parameters
input[[2]] = create_input(
    name = "B",
    type = "impr proba",
    distr = "normal",
    param = c(4, 6),
    monoton = "dunno"
    )
 
# imprecise paramters of afore-described probability distribution
# mean of input number 1 as an interval
input[[3]] = create_input(
    name = "mu_A",
    type = "possi",
    distr = "interval",
    param = c(-0.5, 0.5)
    )

# mean of input number 2 as an interval
input[[4]] = create_input(
    name = "mu_B",
    type = "possi",
    distr = "interval",
    param = c(-0.5, 0.5)
    )

# standard deviation of input number 1  as an interval
input[[5]] = create_input(
    name = "s_A",
    type = "possi",
    distr = "interval",
    param = c(0.7, 1)
    )

# standard deviation of input number 2  as an interval
input[[6]] = create_input(
    name = "s_B",
    type = "possi",
    distr = "interval",
    param = c(0.7, 1)
    )


####CREATION OF THE DISTRIBUTIONS ASSOCIATED TO THE PARAMETERS
input = create_distr(input)

####VISU INPUT (needs propagation parameters to plot impr proba distributions)
plot_input(input)

#################################################
### PROPAGATION
# OPTIMZATION CHOICES (could take some time)
choice_opt = "GENOUD"
param_opt = c(50, 3, 1.e-1)

#PROPAGATION RUN
Z0_IRS = propag(N = 1000, input, FUN, choice_opt, param_opt, mode = "IRS")

#################################################
### VISU - PROPAGATION
plot_cdf(Z0_IRS, xlab = "Z", ylab = "CDF", main = "EX 2", lwd = 1.5)

}