PROPAG: Function for conducting joint propagation of uncertainty

Description Usage Arguments Details Value References See Also Examples

Description

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

1
2
PROPAG(N, input, FUN, choice_opt="L-BFGS-B", param_opt = NULL, 
       mode = "IRS", corr = 0.01, NL = 10)

Arguments

N

Integer corresponding to the number of random samples.

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.

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).

References

See Also

CREATE_INPUT CREATE_DISTR PLOT_CDF

Examples

  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
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
## Not run: 

#################################################
#### 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)


## End(Not run)

HYRISK documentation built on May 2, 2019, 12:54 p.m.