R: Plot a 3-D (using RGL) view of a kriging or modelPredict...
sectionview3d
R Documentation
Plot a 3-D (using RGL) view of a kriging or modelPredict model, including design points
Description
Plot a 3-D view of a kriging or modelPredict model. It is useful for a better understanding of a model behaviour.
Usage
sectionview3d(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 sectionview3d.km, sectionview3d.list or sectionview3d.fun function
Author(s)
Yann Richet, IRSN
See Also
sectionview
Examples
## A 2D example - Branin-Hoo function. See DiceKriging package manual
## 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)
## the same as sectionview3d.km
sectionview3d(m1)
sectionview3d(branin, dim = 2, 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/sectionview3d.Rd_%03d_medium.png", width=480, height=480)
> ### Name: sectionview3d
> ### Title: Plot a 3-D (using RGL) view of a kriging or modelPredict model,
> ### including design points
> ### Aliases: sectionview3d sectionview3d,km-method
> ### sectionview3d,list-method sectionview3d,function-method
> ### Keywords: models
>
> ### ** Examples
>
> ## A 2D example - Branin-Hoo function. See DiceKriging package manual
> ## 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.66836
N = 2, M = 5 machine precision = 2.22045e-16
At X0, 0 variables are exactly at the bounds
At iterate 0 f= 81.668 |proj g|= 0.91677
At iterate 1 f = 81.572 |proj g|= 0.87438
At iterate 2 f = 81.082 |proj g|= 0.92316
At iterate 3 f = 81.059 |proj g|= 0.19545
At iterate 4 f = 81.058 |proj g|= 0.017482
At iterate 5 f = 81.058 |proj g|= 0.00037744
At iterate 6 f = 81.058 |proj g|= 7.5163e-07
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 7.51629e-07
final function value 81.0576
F = 81.0576
final value 81.057643
converged
>
> ## the same as sectionview3d.km
> sectionview3d(m1)
>
> sectionview3d(branin, dim = 2, add = TRUE)
>
>
>
>
>
>
> dev.off()
null device
1
>