kernel.function {KSPM} | R Documentation |
Kernel Functions
Description
These functions transform a matrix into a
kernel matrix.
Usage
kernel.gaussian(x, rho = ncol(x))
kernel.linear(x)
kernel.polynomial(x, rho = 1, gamma = 0, d = 1)
kernel.sigmoid(x, rho = 1, gamma = 1)
kernel.inverse.quadratic(x, gamma = 1)
kernel.equality(x)
Arguments
x |
a |
gamma , rho , d |
kernel hyperparameters (see details) |
Details
Given two dimensional vectors
and
,
the Gaussian kernel is defined as
where
is the Euclidean distance between
and
and
is the bandwidth of the kernel,
the linear kernel is defined as
,
the polynomial kernel is defined as
with
,
is the polynomial order. Of note, a linear kernel is a polynomial kernel with
and
,
the sigmoid kernel is defined as
which is similar to the sigmoid function in logistic regression,
the inverse quadratic function defined as
with
,
the equality kernel defined as
.
Of note, Gaussian, inverse quadratic and equality kernels are measures of similarity resulting to a matrix containing 1 along the diagonal.
Value
A matrix.
Author(s)
Catherine Schramm, Aurelie Labbe, Celia Greenwood
References
Liu, D., Lin, X., and Ghosh, D. (2007). Semiparametric regression of multidimensional genetic pathway data: least squares kernel machines and linear mixed models. Biometrics, 63(4), 1079:1088.