Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/symmetricPair.R
Create a symmetric pair kernel object
1 | symmetricPairKernel(siKernel, kernelType = c("mean", "TPPK"), r = 1)
|
siKernel |
kernel for single instances |
kernelType |
defines the type of pair kernel. It specifies in which way the similarity between two pairs of sequences are computed. Allowed values are "mean", and "TPPK" (see also details section). Default="mean" |
r |
exponent which must be > 0 (details see below). Default=1 |
Creation of kernel object
The function 'symmetricPairKernel' creates a kernel object for the symmetric
pair kernel. This kernel is an example for multiple instance learning and
can be used for learning based on pairs of sequences. The single instance
kernel passed to the symmetric pair kernel computes a similarity between
two individual sequences giving a similarity for one pair of sequences.
The symmetric pair kernel function gets as input two pairs of sequences and
computes a similarity value between the two pairs. This similarity is
computed dependent on the value of the argument kernelType
from the
similarities delivered by the single instance kernel in the following
way:
mean
(arithmetic mean):
k(<a,b>, <c,d>) = 1/4 * (k(a,c) + k(a,d) + k(b,c) + k(b,d))
TPKK
(tensor pairwise product kernel):
k(<a,b>, <c,d>) = (k(a,c) * k(b,d) + k(a,d) * k(b,c))
Every sequence kernel available in KeBABS can be used as single instance kernel for the symmetric pair kernel allowing to create similarity measures between two pairs of sequences based on different similarity measures between individual sequences.
The row names and column names of a kernel matrix generated from a symmetric pair kernel object describe the sequence pair with the names of the individual sequences in the pair separated by the underscore character.
For values different from 1 (=default value) parameter r
leads to a transfomation of similarities by taking each element of the
similarity matrix to the power of r. Only integer values larger than 1
should be used for r in context with SVMs requiring positive definite
kernels.
The symmetricPairKernel can be used in sequence based learning like any single instance kernel. Label values are defined against pairs of sequences in this case. Explicit representation, feature weights and prediction profiles are not available for the symmetric pair kernel. As kernels computed through sums and products of postive definite kernels all variants of this kernel are positive definite.
symmetricPairKernel: upon successful completion, the function returns a
kernel object of class SymmetricPairKernel
.
Johannes Palme <kebabs@bioinf.jku.at>
http://www.bioinf.jku.at/software/kebabs
(Hue, 2002) – M.Hue and J.-P.Vert. On learning with kernels for unordered
pairs.
(Ben-Hur, 2005) – A. Ben-Hur and W.S. Noble. Kernel methods for predicting
protein-protein interactions.
(Gaertner, 2002) – T. Gaertner, P.A. Flach, A. Kowalczyk, A.J. Smola.
Multi-Instance Kernels.
J. Palme, S. Hochreiter, and U. Bodenhofer (2015) KeBABS: an R package
for kernel-based analysis of biological sequences.
Bioinformatics, 31(15):2574-2576, 2015.
DOI: 10.1093/bioinformatics/btv176.
kernelParameters-method
,
getKernelMatrix
, spectrumKernel
,
mismatchKernel
, motifKernel
,
gappyPairKernel
, SymmetricPairKernel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## load sample sequences from transcription factor binding dataset
data(TFBS)
## in this example we just use the first 30 sequences and rename samples
x <- enhancerFB[1:30]
names(x) <- paste("S", 1:length(x), sep="")
## create the single instance kernel object
specK5 <- spectrumKernel(k=5)
## show details of single instance kernel object
specK5
## create the symmetric pair kernel object for the single instance kernel
tppk <- symmetricPairKernel(siKernel=specK5, kernelType="TPPK")
## generate the kernel matrix with the symmetric pair kernel object which
## contains similarity values between two pairs of sequences.
## Hint: The kernel matrix for the single instance kernel is computed
## internally.
km <- tppk(x)
dim(km)
km[1:5,1:5]
## Not run:
## plot heatmap of the kernel matrix
heatmap(km, symm=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.