covQual-class {kergp} | R Documentation |
Class "covQual"
Description
Covariance kernel for qualitative inputs.
Objects from the Class
Objects can be created by calls of the form new("covQual", ...)
.
Slots
covLevels
:-
Object of class
"function"
. This function has arguments'par'
and optional argumentslowerSQRT
andcompGrad
. It returns the covariance matrix for an input corresponding to all the levels. covLevMat
:-
Object of class
"matrix"
. This is the result returned by the functioncovLevels
(former slot) withlowerSQRT = FALSE
andgradient = FALSE
. hasGrad
:-
Object of class
"logical"
. WhenTRUE
, the covariance matrix returned by the function in slotcovLevels
must compute the gradients. The returned covariance matrix must have a"gradient"
attribute; this must be an array with dimensionc(m, m, np)
wherem
stands for the number of levels andnp
is the number of parameters. acceptLowerSQRT
:-
Object of class
"logical"
. WhenTRUE
, the function in slotcovLevels
must have a formallowerSQRT
which can receive a logical value. When the value isTRUE
the Cholesky (lower) root of the covariance is returned instead of the covariance. label
:-
Object of class
"character"
. A description of the kernel which will remained attached with it. d
:-
Object of class
"integer"
. The dimension or number of (qualitative) inputs of the kernel. inputNames
:-
Object of class
"character"
. The names of the (qualitative) inputs. These will be matched against the columns of a data frame when the kernel will be evaluated. nlevels
:-
Object of class
"integer"
. A vector with lengthd
giving the number of levels for each of thed
inputs. levels
:-
Object of class
"list"
. A list of lengthd
containing thed
character vectors of levels for thed
(qualitative) inputs. parLower
:-
Object of class
"numeric"
. Vector ofparN
lower values for the parameters of the structure. The value-Inf
can be used when needed. parUpper
:-
Object of class
"numeric"
. Vector ofparN
upper values for the parameters of the structure. The valueInf
can be used when needed. par
:-
Object of class
"numeric"
. Vector ofparN
current values for the structure. parN
:-
Object of class
"integer"
. Number of parameters for the structure, as returned by thenpar
method. kernParNames
:-
Object of class
"character"
. Vector of lengthparN
giving the names of the parameters. E.g."range"
,"var"
,"sigma2"
are popular names. ordered
:-
Vector of class
"logical"
indicating whether the factors are ordered or not. intAsChar
:-
Object of class
"logical"
indicating how to cope with an integer input. WhenintAsChar
isTRUE
the input is coerced into a character; the values taken by this character vector should then match the levels in thecovQual
object as given bylevels(object)[[1]]
. If insteadintAsChar
isFALSE
, the integer values are assumed to correspond to the levels of thecovQual
object in the same order.
Methods
- checkX
-
signature(object = "covQual", X = "data.frame")
: check that the inputs exist with suitable column names and suitable factor content. The levels should match the prescribed levels. Returns a matrix with the input columns in the order prescribed byobject
.signature(object = "covQual", X = "matrix")
: check that the inputs exist with suitable column names and suitable numeric content for coercion into a factor with the prescribed levels. Returns a data frame with the input columns in the order prescribed byobject
. - coef<-
-
signature(object = "covQual")
: replace the whole vector of coefficients, as required during ML estimation. - coefLower<-
-
signature(object = "covQual")
: replacement method for lower bounds on covQual coefficients. - coefLower
-
signature(object = "covQual")
: extracts the numeric values of the lower bounds. - coef
-
signature(object = "covQual")
: extracts the numeric values of the covariance parameters. - coefUpper<-
-
signature(object = "covQual")
: replacement method for upper bounds oncovQual
coefficients. - coefUpper
-
signature(object = "covQual")
: ... - covMat
-
signature(object = "covQual")
: build the covariance matrix or the cross covariance matrix between two sets of locations for acovQual
object. - npar
-
signature(object = "covQual")
: returns the number of parameters. - plot
signature(x = "covQual")
: seeplot,covQual-method
.- scores
-
signature(object = "covQual")
: return the vector of scores, i.e. the derivative of the log-likelihood w.r.t. the parameter vector at the current parameter values. - simulate
-
signature(object = "covQual")
: simulatensim
paths from a Gaussian Process having the covariance structure. The paths are indexed by the finite set of levels of factor inputs, and they are returned as columns of a matrix. - varVec
-
signature(object = "covQual")
: build the variance vector corresponding to a set locations for acovQual
object.
Note
This class is to be regarded as experimental. The slot names or list
may be changed in the future. The methods npar
,
inputNames
or `inputNames<-`
should provide a more
robust access to some slot values.
See Also
See covMan
for a comparable structure dedicated
to kernels with continuous inputs.
Examples
showClass("covQual")