Evaluation of kernels
Usage
kernelEval(tZ, kernel = c("linear", "poly", "gaussian"), ...)
linKernelEval(tZ)
gaussKernelEval(tZ, sigma = 1)
polyKernelEval(tZ, a = 0, d = 2)
genericKernelEval(tZ, kernel_func, ...)
gaussKernelEval_multipleRhos(tZ, rho)
polyKernelEval_multipleRhos(tZ, rho, d = 2)
Arguments
- tZ
a
P x N
matrix of genomic covariates (i.e., the usual data array Z transposed)- kernel
which kernel is evaluated by
kerneval
. Possible values include currently implemented kernels designated by a character string"linear"
,"poly"
and"gaussian"
. Otherwise can also be a user-defined function (seekernel_func
).- ...
other arguments to be passed to be passed to the evaluated kernel function.
- sigma
standard-deviation parameter for the
"gaussian"
kernel.- a
TODO of the polynomial for the
"poly"
. Default is0
- d
power of the polynomial. Default is
2
(quadratic kernel).- kernel_func
a function, whose first argument should be
tZ
- rho
either a single rho to evaluate the kernel at, or a vector of rhos
Value
kernelEval
, linKernelEval
, gaussKernelEval
, and genericKernelEval
return an N x N
matrix with entries K(Z[i,], Z[j,])
[persons i,j]
gaussKernelEval_multipleRhos
and polyKernelEval_multipleRhos
return
a matrix of dimension Q x N^2
, where Q
is the length
of rho
,
each row corresponds to a rho (puns!) to get the actual kernel matrix associated with a particular
value of rho, if output is G
, take matrix(G[i,], N)