| 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 argumentslowerSQRTandcompGrad. 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 = FALSEandgradient = FALSE. hasGrad:-
Object of class
"logical". WhenTRUE, the covariance matrix returned by the function in slotcovLevelsmust compute the gradients. The returned covariance matrix must have a"gradient"attribute; this must be an array with dimensionc(m, m, np)wheremstands for the number of levels andnpis the number of parameters. acceptLowerSQRT:-
Object of class
"logical". WhenTRUE, the function in slotcovLevelsmust have a formallowerSQRTwhich can receive a logical value. When the value isTRUEthe 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 lengthdgiving the number of levels for each of thedinputs. levels:-
Object of class
"list". A list of lengthdcontaining thedcharacter vectors of levels for thed(qualitative) inputs. parLower:-
Object of class
"numeric". Vector ofparNlower values for the parameters of the structure. The value-Infcan be used when needed. parUpper:-
Object of class
"numeric". Vector ofparNupper values for the parameters of the structure. The valueInfcan be used when needed. par:-
Object of class
"numeric". Vector ofparNcurrent values for the structure. parN:-
Object of class
"integer". Number of parameters for the structure, as returned by thenparmethod. kernParNames:-
Object of class
"character". Vector of lengthparNgiving 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. WhenintAsCharisTRUEthe input is coerced into a character; the values taken by this character vector should then match the levels in thecovQualobject as given bylevels(object)[[1]]. If insteadintAsCharisFALSE, the integer values are assumed to correspond to the levels of thecovQualobject 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 oncovQualcoefficients. - coefUpper
-
signature(object = "covQual"): ... - covMat
-
signature(object = "covQual"): build the covariance matrix or the cross covariance matrix between two sets of locations for acovQualobject. - 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"): simulatensimpaths 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 acovQualobject.
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")