tell.GPCE.lar: Adaptive sparse generalized polynomial chaos expansion based...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/tell.GPCE.lar.R

Description

The function tell.GPCE.lar is used for generalized polynomial chaos expansion of external models. When a functional model is given to the function GPCE.lar, this latter automatically call the function tell.GPCE.lar. When in the function GPCE.lar the Model option is NULL then this latter returns a list of Designs and a list of Arguments, Args, the ones entered for the previous GPCE.lar run. Then the Designs, the Args and the vector of manually calculated outputs need to be given to the function tell.GPCE.lar to run the algorithm.

Usage

1
2
## S3 method for class 'GPCE.lar'
tell(x,Output,...)

Arguments

x

ResultObjectDesign2EvalArgs: A list of arguments returned by the PCE function

Output

The vector of the manually calculated model outputs

...

additional parameters

Value

The same as the GPCE.lar function

Author(s)

Munoz Zuniga Miguel

References

G. Blatman and B. Sudret, 2011, Adapive sparse polynomial chaos expansion based on least angle regression, Journal of Computational Physics, 230, 2345–2367.

See Also

GPCE.lar

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
### External model (for the example the function Model defined below will be used externaly)
### Model definition: y= 1 + Phi_1(x1)*Phi_1(x2) + Phi_3(x2)
Model <- function(x){
  PHerm = hermite.he.polynomials(5, normalized=FALSE)
  y=1+unlist(polynomial.values(PHerm[2],x[,1]))*unlist(polynomial.values(PHerm[2],x[,2]))+
  unlist(polynomial.values(PHerm[4],x[,2]))/sqrt(factorial(3))
  return(y)
}

### initialized Output
Output=c()

### Get a first design
ResultObject=GPCE.lar(PCSpace="Gaussian",InputDim=3,InputDistrib=rep("Gaussian",3))
names(ResultObject)

### Calculate the model output for the given design and concatenate the model output results
### into the output vector 
Output=c(Output,Model(ResultObject$Design2Eval))

### Give the design and the calculated ouput to the tell function
ResultObject=tell(ResultObject,Output)
names(ResultObject)

### If the expansion has been calculated the function tell return the full expansion 
### paramaters, the moments analysis, the sensitivity analysis and the output distribution
### If not the function tell() return an enriched design. 
### In the later case the user calculate the output 
### externally and give them to the tell function
### with the previous ResultObject for further calculation. 
### See GPCE.sparse documentation for an example.

GPC documentation built on May 30, 2017, 12:50 a.m.