pathClass (version 0.9.4)

fit.graph.svm: Implementation of a supervised classification framework introduced by Franck Rapaport et al., 2007.

Description

mapping must be a data.frame with at least two columns. The column names have to be c('probesetID','graphID'). Where 'probesetID' is the probeset ID present in the expression matrix (i.e. colnames(x)) and 'graphID' is any ID that represents the nodes in the diffusionKernel (i.e. colnames(diffusionKernel) or rownames(diffusionKernel)). The purpose of the this mapping is that a gene or protein in the network might be represented by more than one probe set on the chip. Therefore, the algorithm must know which genes/protein in the network belongs to which probeset on the chip.

Usage

fit.graph.svm(x, y, DEBUG = FALSE, scale = c("center", "scale"), Cs = 10^c(-3:3), stepsize = 0.1, mapping, diffusionKernel, useOrigMethod = FALSE)

Arguments

x
a p x n matrix of expression measurements with p samples and n genes.
y
a factor of length p comprising the class labels.
DEBUG
should debugging information be plotted.
scale
a character vector defining if the data should be centered and/or scaled. Possible values are center and/or scale. Defaults to c('center', 'scale').
Cs
soft-margin tuning parameter of the SVM. Defaults to 10^c(-3:3).
stepsize
amount of features that are discarded in each step of the feature elimination. Defaults to 10%.
mapping
a mapping that defines how probe sets are summarized to genes.
diffusionKernel
the diffusion kernel which was pre-computed by using the function calc.diffusionKernel
useOrigMethod
use the method originally decribed in the paper by Franck Rapaport et al. 2007

Value

a graphSVM object
features
the selected features
error.bound
the span bound of the model
fit
the fitted SVM model

References

Rapaport F. et al. (2007). Classification of microarray data using gene networks. BMC Bioinformatics

Examples

Run this code
## Not run: 
# library(Biobase)
# data(sample.ExpressionSet)
# x <- t(exprs(sample.ExpressionSet))
# y <- factor(pData(sample.ExpressionSet)$sex)
# # create the mapping
# library('hgu95av2.db')
# mapped.probes <- mappedkeys(hgu95av2REFSEQ)
# refseq <- as.list(hgu95av2REFSEQ[mapped.probes])
# times <- sapply(refseq, length)
# mapping <- data.frame(probesetID=rep(names(refseq), times=times), graphID=unlist(refseq), 
# row.names=NULL, stringsAsFactors=FALSE)
# mapping <- unique(mapping)
# library(pathClass)
# data(adjacency.matrix)
# matched <- matchMatrices(x=x, adjacency=adjacency.matrix, mapping=mapping)
# dk <- calc.diffusionKernel(L=matched$adjacency, is.adjacency=TRUE, beta=0) # beta should be tuned
# res.gSVM <- crossval(matched$x, y, theta.fit=fit.graph.svm, folds=5, repeats=2, DEBUG=TRUE, 
# parallel=FALSE, Cs=10^(-3:3), mapping=matched$mapping, diffusionKernel=dk)
# ## End(Not run)

Run the code above in your browser using DataCamp Workspace