Description Usage Arguments Details Value Note Author(s) References See Also Examples
Computes the prediction error by considering a testing dataset.
1 |
X |
Matrix of observations with n rows and d columns. |
XT |
Matrix of observations of the testing dataset with n^{test} rows and d columns. |
YT |
Vector of response observations of testing dataset of size n^{test}. |
mu |
Vector of positive scalars. Values of the Group Sparse penalty parameter in decreasing order. See function |
gamma |
Vector of positive scalars. Values of the Ridge penalty parameter in decreasing order. See function |
res |
List, includes a squence of estimated meta models for the learning dataset, using RKHS Ridge Group Sparse or RKHS Group Lasso algorithm, associated with the penalty parameters mu and gamma. It should have the same format as the output of one of the functions: |
kernel |
Character, shows the type of the reproducing kernel: matern, brownian, gaussian, linear, quad. The same kernel should be chosen as the one used for the learning dataset. See function |
Dmax |
Integer between 1 and d. The same Dmax should be chosen as the one used for learning dataset. See function |
Details.
Matrix of the prediction errors is returned. Each element of the matrix is the obtained prediction error associated with one RKHS meta model in "res".
Note.
Halaleh Kamari
Kamari, H., Huet, S. and Taupin, M.-L. (2019) RKHSMetaMod : An R package to estimate the Hoeffding decomposition of an unknown function by solving RKHS Ridge Group Sparse optimization problem. <arXiv:1905.13695>
calc_Kv
, pen_MetMod
, RKHSMetMod
, RKHSMetMod_qmax
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | d <- 3
n <- 50
nT <- 50
library(lhs)
X <- maximinLHS(n, d)
XT <- maximinLHS(nT, d)
c <- c(0.2,0.6,0.8)
F <- 1;for (a in 1:d) F <- F*(abs(4*X[,a]-2)+c[a])/(1+c[a])
FT <- 1;for (a in 1:d) FT <- FT*(abs(4*XT[,a]-2)+c[a])/(1+c[a])
sigma <- 0.2
epsilon <- rnorm(n,0,1);Y <- F + sigma*epsilon
epsilonT <- rnorm(nT,0,1);YT <- FT + sigma*epsilonT
Dmax <- 3
kernel <- "matern"
frc <- c(10,100)
gamma <- c(.5,.01,.001)
res <- RKHSMetMod(Y,X,kernel,Dmax,gamma,frc,FALSE)
mu <- vector()
l <- length(gamma)
for(i in 1:length(frc)){mu[i]=res[[(i-1)*l+1]]$mu}
error <- PredErr(X,XT, YT,mu,gamma, res, kernel,Dmax)
error
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.