forked from vineet1992/Gene-Selection
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalgorithm.R
More file actions
17 lines (15 loc) · 783 Bytes
/
algorithm.R
File metadata and controls
17 lines (15 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
data <- read.table("C:/Users/Marcus/Desktop/eset_highest_variance.txt", header=TRUE, sep='\t')
x <- (data)
y <- factor(data$Response)
library(hgu133a.db)
mapped.probes <- mappedkeys(hgu133aREFSEQ)
refseq <- as.list(hgu133aREFSEQ[mapped.probes])
times <- sapply(refseq, length)
mapping <- data.frame(probesetID=rep(names(refseq), times=times), graphID=unlist(refseq),
row.names=NULL, stringsAsFactors=FALSE)
library(pathClass)
data(adjacency.matrix)
matched <- matchMatrices(x=x, adjacency=adjacency.matrix, mapping=mapping)
ad.list <- as.adjacencyList(matched$adjacency)
res.nBSVM <- crossval(matched$x, y, theta.fit=fit.networkBasedSVM, folds=3, repeats=1, DEBUG=TRUE,
parallel=FALSE, adjacencyList=ad.list, lambdas=10^(-1:2), sd.cutoff=50)