Description Usage Arguments Details Value Author(s) References
These functions transform a n x p matrix into a n x n kernel matrix.
1 2 3 4 5 6 7 8 9 10 11 | 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)
|
x |
a n x p matrix |
gamma, rho, d |
kernel hyperparameters (see details) |
Given two p-dimensional vectors x and y,
the Gaussian kernel is defined as k(x,y) = exp(-||x-y||^2 / rho) where ||x-y|| is the Euclidean distance between x and y and rho > 0 is the bandwidth of the kernel,
the linear kernel is defined as k(x,y) = t(x).y,
the polynomial kernel is defined as k(x,y) = (rho.t(x).y + gamma)^d with rho > 0, d is the polynomial order. Of note, a linear kernel is a polynomial kernel with rho = d = 1 and gamma = 0,
the sigmoid kernel is defined as k(x,y) = tanh(rho.t(x).y + gamma) which is similar to the sigmoid function in logistic regression,
the inverse quadratic function defined as k(x,y) = 1 / sqrt( ||x-y||^2 + gamma) with gamma > 0,
the equality kernel defined as k(x,y) = 1 if x = y, 0 otherwise.
Of note, Gaussian, inverse quadratic and equality kernels are measures of similarity resulting to a matrix containing 1 along the diagonal.
A n x n matrix.
Catherine Schramm, Aurelie Labbe, Celia Greenwood
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.