R: Plot a section view of a kriging or modelPredict model...
sectionview
R Documentation
Plot a section view of a kriging or modelPredict model including design points, or a function.
Description
Plot one section view per dimension of a kriging,
modelPredict model or function. It is useful for a better understanding
of a model behaviour (including uncertainty).
Usage
sectionview(model, ...)
Arguments
model
an object of class "km", a list that can be used
in a "modelPredict" call, or a function.
...
other arguments of the contourview.km, contourview.list or contourview.fun function
Author(s)
Yann Richet, IRSN
See Also
See the documentation of sectionview.km, sectionview.list, or sectionview.fun
for the arguments.
The sectionview3d method provides a 3D version.
Examples
## A 2D example - Branin-Hoo function
## a 16-points factorial design, and the corresponding response
d <- 2; n <- 16
design.fact <- expand.grid(seq(0, 1, length = 4), seq(0, 1, length = 4))
design.fact <- data.frame(design.fact); names(design.fact) <- c("x1", "x2")
y <- branin(design.fact)
## kriging model 1 : matern5_2 covariance structure, no trend, no nugget effect
m1 <- km(design = design.fact, response = y)
sectionview(m1, center = c(.333, .333))
sectionview(branin, dim = 2, center = c(.333, .333), add = TRUE)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(DiceView)
Loading required package: DiceKriging
Loading required package: DiceEval
Loading required package: rgl
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DiceView/sectionview.Rd_%03d_medium.png", width=480, height=480)
> ### Name: sectionview
> ### Title: Plot a section view of a kriging or modelPredict model including
> ### design points, or a function.
> ### Aliases: sectionview sectionview,km-method sectionview,list-method
> ### sectionview,function-method
>
> ### ** Examples
>
> ## A 2D example - Branin-Hoo function
> ## a 16-points factorial design, and the corresponding response
> d <- 2; n <- 16
> design.fact <- expand.grid(seq(0, 1, length = 4), seq(0, 1, length = 4))
> design.fact <- data.frame(design.fact); names(design.fact) <- c("x1", "x2")
> y <- branin(design.fact)
>
> ## kriging model 1 : matern5_2 covariance structure, no trend, no nugget effect
> m1 <- km(design = design.fact, response = y)
optimisation start
------------------
* estimation method : MLE
* optimisation method : BFGS
* analytical gradient : used
* trend model : ~1
* covariance model :
- type : matern5_2
- nugget : NO
- parameters lower bounds : 1e-10 1e-10
- parameters upper bounds : 2 2
- best initial criterion value(s) : -81.66013
N = 2, M = 5 machine precision = 2.22045e-16
At X0, 0 variables are exactly at the bounds
At iterate 0 f= 81.66 |proj g|= 1.0441
At iterate 1 f = 81.499 |proj g|= 0.98392
At iterate 2 f = 81.154 |proj g|= 1.2805
At iterate 3 f = 81.06 |proj g|= 0.28058
At iterate 4 f = 81.058 |proj g|= 0.049742
At iterate 5 f = 81.058 |proj g|= 0.0016841
At iterate 6 f = 81.058 |proj g|= 9.6446e-06
iterations 6
function evaluations 8
segments explored during Cauchy searches 8
BFGS updates skipped 0
active bounds at final generalized Cauchy point 1
norm of the final projected gradient 9.64458e-06
final function value 81.0576
F = 81.0576
final value 81.057643
converged
>
> sectionview(m1, center = c(.333, .333))
>
> sectionview(branin, dim = 2, center = c(.333, .333), add = TRUE)
[1] 0 1
[1] 0 1
>
>
>
>
>
>
> dev.off()
null device
1
>