Description Usage Arguments Details Value Author(s) References See Also Examples
Provide the predictive errors and variances of the cross validation procedure when observations are removed from all code levels.
1 | CrossValidationMuFicokmAll(model, indice)
|
model |
an object of class S3 ( |
indice |
a vector containing the indices of the observations removed from the highest code level for the cross-validation procedure. |
This function performs all the possible cross-validation procedures. Indeed, due to the nested property of the experimental design sets, we can choose to remove observations only from the highest code level or the two highest code levels and so on.
CVerr |
a list of vectors indexed by q containing the predictive errors of the cross-validation procedure when the observations are removed from the q highest code levels. |
CVvar |
a list of vectors indexed by q containing the predictive variances of the cross-validation procedure when the observations are removed from the q highest code levels. |
CVCov |
a list indexed by q of the predictive covariance matrices of the cross-validation procedure when the observations are removed from the q highest code levels. |
CVerrall |
a vector containing the predictive errors of the cross-validation procedure when the observations are removed from all code levels. |
CVvarall |
a vector containing the predictive variances of the cross-validation procedure when the observations are removed from all code levels. |
CVCovall |
the predictive covariance matrix of the cross-validation procedure when the observations are removed from all code levels. |
Loic Le Gratiet
LE GRATIET, L. & GARNIER, J. (2012), Recursive co-kriging model for Design of Computer Experiments with multiple levels of fidelity, arXiv:1210.0686
MuFicokm
, CrossValidationMuFicokm
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 | #--- test functions (see [Le GRATIET, L. 2012])
Funcf <- function(x){return(0.5*(6*x-2)^2*sin(12*x-4)+sin(10*cos(5*x)))}
Funcc <- function(x){return((6*x-2)^2*sin(12*x-4)+10*(x-0.5)-5)}
#--- Data
Dc <- seq(0,1,0.1)
indDf <- c(1,3,7,11)
DNest <- NestedDesign(Dc, nlevel=2 , indices = list(indDf) )
zc <- Funcc(DNest$PX)
zf <- Funcf(ExtractNestDesign(DNest,2))
#--- Model creation with parameter estimations
mymodel <- MuFicokm(
formula = list(~1,~1+X1),
MuFidesign = DNest,
response = list(zc,zf),
nlevel = 2,
covtype = "matern5_2")
#--- Cross Validation
indice <- c(1,3)
CVAll <- CrossValidationMuFicokmAll(mymodel,indice)
#-- predictive errors when we remove the observations from Funcf and Funcc
CVAll$CVerrall
#-- predictive variances when we remove the observations from Funcf and Funcc
CVAll$CVvarall
#-- predictive covariance matrix when we remove the observations from Funcf and Funcc
CVAll$CVCovall
#-- predictive errors when we remove the observations from Funcf
CVAll$CVerr[[1]]
#-- predictive variances when we remove the observations from Funcf
CVAll$CVvar[[1]]
#-- predictive covariance matrix when we remove the observations from Funcf
CVAll$CVCov[[1]]
#--- Leave-One-Out Cross Validation
#-- LOO CV predictive errors
apply(matrix(1:DNest$n),1,function(x) CrossValidationMuFicokmAll(mymodel,x)$CVerrall)
|
Loading required package: DiceKriging
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
- parameters upper bounds : 2
- best initial criterion value(s) : -30.0395
N = 1, M = 5 machine precision = 2.22045e-16
At X0, 0 variables are exactly at the bounds
At iterate 0 f= 30.039 |proj g|= 1.3554
At iterate 1 f = 30.033 |proj g|= 0.0054075
At iterate 2 f = 30.033 |proj g|= 0.00021824
At iterate 3 f = 30.033 |proj g|= 3.7897e-08
iterations 3
function evaluations 6
segments explored during Cauchy searches 3
BFGS updates skipped 0
active bounds at final generalized Cauchy point 0
norm of the final projected gradient 3.78972e-08
final function value 30.0335
F = 30.0335
final value 30.033468
converged
optimisation start
------------------
* estimation method : MLE
* optimisation method : BFGS
* analytical gradient : used
* trend model : ~X1
* covariance model :
- type : matern5_2
- nugget : NO
- parameters lower bounds : 1e-10
- parameters upper bounds : 2
- best initial criterion value(s) : -0.3681792
N = 1, M = 5 machine precision = 2.22045e-16
At X0, 0 variables are exactly at the bounds
At iterate 0 f= 0.36818 |proj g|= 0.068155
At iterate 1 f = 0.32578 |proj g|= 0
iterations 1
function evaluations 2
segments explored during Cauchy searches 1
BFGS updates skipped 0
active bounds at final generalized Cauchy point 1
norm of the final projected gradient 0
final function value 0.32578
F = 0.32578
final value 0.325780
converged
[1] 1.1975188 0.1558947
[1] 3.3408142 0.5482324
[,1] [,2]
[1,] 3.3408142 -0.7254001
[2,] -0.7254001 0.5482324
[1] 2.0530830 -0.1630859
[1] 14.777187 2.164815
[,1] [,2]
[1,] 14.777187 -3.276186
[2,] -3.276186 2.164815
[1] 1.081382305 -0.834986538 0.370079124 -0.002980427
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.