Description Usage Arguments Details Value See Also Examples
Compute the gradient wrt the kernel parameters.
1 | kernGradient(kern, x, ...)
|
kern |
the kernel structure for which the gradients are being computed. |
x |
the input locations for which the gradients are being computed, specifically those associated with the rows of the kernel matrix if there are two arguments of input locations. |
... |
optional arguments including potentially: the input locations associated with the columns of the kernel matrix; matrix of partial derivatives of the function of interest with respect to the kernel matrix. With single input, the argument takes the form of a square matrix of dimension numData, where numData is the number of rows in x, with two input arguments the matrix should have the same number of rows as the first and the same number of columns as the second has rows. |
g <- kernGradient(kern, x, partial)
g <- *kernGradient(kern, x, partial)
computes the gradient of functions with respect to the kernel parameters. As well as the kernel structure and the input positions, the user provides a matrix PARTIAL which gives the partial derivatives of the function with respect to the relevant elements of the kernel matrix.
g <- kernGradient(kern, x1, x2, partial_)
g <- *kernGradient(kern, x1, x2, partial_)
computes the derivatives as above, but input locations are now provided in two matrices associated with rows and columns of the kernel matrix.
g <- *X*kernGradient(kern1, kern2, x, partial)
g <- *X*kernGradient(kern1, kern2, x1, x2, partial_)
same as above, but for cross combinations of two kernels, kern1
and kern2
.
g |
gradients of the function of interest with respect to the kernel parameters. The ordering of the vector should match that provided by the function kernExtractParam. |
kernCompute
, kernExtractParam
.
1 2 | kern <- kernCreate(1, 'rbf')
g <- kernGradient(kern, as.matrix(c(1, 4)), array(1, c(2, 2)))
|
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, basename, cbind, colMeans, colSums, colnames,
dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
intersect, is.unsorted, lapply, lengths, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which, which.max, which.min
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.