kernCreate {tigre} | R Documentation |
Initialise a kernel structure.
kernCreate(x, kernType, kernOptions=NULL)
x |
If list, array or matrix: input data values (from which kernel will later be computed). If scalar: input dimension of the design matrix (i.e. number of features in the design matrix). |
kernType |
Type of kernel to be created, some standard types are
'rbf', 'white', 'sim' and 'disim'. If a list of the form
|
kernOptions |
(optional) list of kernel options |
kern <- kernCreate(X, type)
input points and a kernel type.
kern <- kernCreate(dim, type)
creates a kernel matrix structure given the dimensions of the design matrix and the kernel type.
The *KernParamInit functions perform initialisation specific to different types of kernels. They should not be called directly.
kern |
The kernel structure. |
# Create a multi kernel with two rbf blocks with bounded inverse widths invWidthBounds <- c(0.5, 2) kernType <- list(type="multi", comp=list()) for (i in 1:2) kernType$comp[[i]] <- list(type="parametric", realType="rbf", options=list(isNormalised=TRUE, inverseWidthBounds=invWidthBounds)) kern <- kernCreate(1, kernType) # Tie the inverse with parameters of the component RBF kernels kern <- modelTieParam(kern, list(tieWidth="inverseWidth")) kernDisplay(kern)