Description Usage Arguments Details Value See Also Examples
Creator function for the class covOrd-class
1 2 3 4 5 6 7 8 9 10 |
ordered |
An object coerced to |
k1Fun1 |
A function representing a 1-dimensional stationary kernel function, with no or fixed parameters. |
warpFun |
Character corresponding to an increasing warping function. See |
cov |
Character indicating whether a correlation or homoscedastic kernel is used. |
hasGrad |
Object of class |
inputs |
Character: name of the ordinal input. |
par, parLower, parUpper |
Numeric vectors containing covariance parameter values/bounds in the following order:
warping, range and variance if required ( |
warpKnots |
Numeric vector containing the knots used when a spline warping is chosen. The knots must be in [0, 1], and 0 and 1 are automatically added if not provided. The number of knots cannot be greater than the number of levels. |
nWarpKnots |
Number of knots when a spline warping is used. Ignored if |
label |
Character giving a brief description of the kernel. |
intAsChar |
Logical. If |
... |
Not used at this stage. |
Covariance kernel for qualitative ordered inputs obtained by warping.
Let u be an ordered factor with levels u[1], ..., u[L]. Let k1 be a 1-dimensional stationary kernel (with no or fixed parameters), F a warping function i.e. an increasing function on the interval [0,1] and theta a scale parameter. Then k is defined by:
k(u[i], u[j]) = k1([F(z[i]) - F(z[j])]/theta)
where z[1], ..., z[L] form a regular sequence from 0 to 1 (included). At this stage, the possible choices are:
A distribution function (cdf) truncated to [0,1], among the Power and Normal cdfs.
For the Normal distribution, an unnormalized version, corresponding to the restriction of the cdf on [0,1], is also implemented (warp = "unorm"
).
An increasing spline of degree 1 (piecewise linear function) or 2. In this case, F is unnormalized. For degree 2, the implementation depends on scaling functions from DiceKriging package, which must be loaded here.
Notice that for unnormalized F
, we set theta to 1, in order to avoid overparameterization.
An object of class covOrd-class
, inheriting from covQual-class
.
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 | u <- ordered(1:6, labels = letters[1:6])
myCov <- covOrd(ordered = u, cov = "homo", intAsChar = FALSE)
myCov
coef(myCov) <- c(mean = 0.5, sd = 1, theta = 3, sigma2 = 2)
myCov
checkX(myCov, X = data.frame(u = c(1L, 3L)))
covMat(myCov, X = data.frame(u = c(1L, 3L)))
myCov2 <- covOrd(ordered = u, k1Fun1 = k1Fun1Cos, warpFun = "power")
coef(myCov2) <- c(pow = 1, theta = 1)
myCov2
plot(myCov2, type = "cor", method = "ellipse")
plot(myCov2, type = "warp", col = "blue", lwd = 2)
myCov3 <- covOrd(ordered = u, k1Fun1 = k1Fun1Cos, warpFun = "spline1")
coef(myCov3) <- c(rep(0.5, 2), 2, rep(0.5, 2))
myCov3
plot(myCov3, type = "cor", method = "ellipse")
plot(myCov3, type = "warp", col = "blue", lwd = 2)
str(warpPower) # details on the list describing the Power cdf
str(warpNorm) # details on the list describing the Normal cdf
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.