Methods to compute score functions applied to a single vertex of the graph
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  ## S4 method for signature 'graph'
single.NN.score(RW, x, x.pos, auto = FALSE)
## S4 method for signature 'matrix'
single.NN.score(RW, x, x.pos, auto = FALSE)
## S4 method for signature 'graph'
single.KNN.score(RW, x, x.pos, k = 3, auto = FALSE)
## S4 method for signature 'matrix'
single.KNN.score(RW, x, x.pos, k = 3, auto = FALSE)
## S4 method for signature 'graph'
single.eav.score(RW, x, x.pos, auto = FALSE)
## S4 method for signature 'matrix'
single.eav.score(RW, x, x.pos, auto = FALSE)
## S4 method for signature 'graph'
single.WSLD.score(RW, x, x.pos, d = 2, auto = FALSE)
## S4 method for signature 'matrix'
single.WSLD.score(RW, x, x.pos, d = 2, auto = FALSE)

RW 
matrix. It must be a kernel matrix or a symmetric matrix expressing the similarity between nodes 
x 
integer. Index corresponding to the element of the RW matrix for which the score must be computed 
x.pos 
vector of integer. Indices of the positive elements of the RW matrix 
k 
integer. Number of the k nearest neighbours to be considered 
d 
integer. Coefficient of linear decay (def. 2) 
auto 
boolean. If TRUE the components K(x,x) + K(x_i,x_i) are computed, otherwise are discarded (default) 
single.NN.score
computes the NN score for a single vertex:
score(x) =  \min_{x_i \in V_C} ( K(x,x) + K(x_i,x_i) 2 K(x,x_i))
where V_C is the set of positive vertices.
single.KNN.score
compute KNN score for a single vertex:
score(x) =  ∑_{k \; nearest \; x_i \in V_C} ( K(x,x) + K(x_i,x_i)  2 K(x,x_i))
single.eav.score
computes the Empirical Average score for a single vertex:
score(x) =  K(x,x) + \frac{2}{V_C} * ∑_{x_i \in V_C} K(x,x_i)
single.WSLD.score
computes the WSLD score for a single vertex:
Let K(x, x_{jk}) be the kth rank order index w.r.t. x_j \in V_C, and m=V_C, then:
score(x) = \max_{x_i \in V_C} K(x,x_i) + ∑_{k=2}^m [(1/(d * (k1))) * K(x, x_{jk})]
single.NN.score
: the NN score of the vertex
single.KNN.score
: the KNN score of the vertex
single.eav.score
: the Empirical Average score of the vertex
single.WSLD.score
: the Weighted Sum with Linear Decay score (WSLD) of the vertex
signature(RW = "graph")
single.NN.score
computes the NN score for a single vertex using a graph of class graph
(hence including objects of class graphAM and graphNEL from the package graph)
single.KNN.score
computes the KNN score for a single vertex using a graph of class graph
(hence including objects of class graphAM and graphNEL from the package graph)
single.eav.score
computes the Empirical Average score for a single vertex using a graph of class graph
(hence including objects of class graphAM and graphNEL from the package graph)
single.WSLD.score
computes the Weighted Sum with Linear Decay score for a single vertex using a graph of class graph
(hence including objects of class graphAM and graphNEL from the package graph)
signature(RW = "matrix")
single.NN.score
computes the NN score for a single vertex using a kernel matrix or a symmetric matrix expressing the similarity between nodes
single.KNN.score
computes the KNN score for a single vertex using a kernel matrix or a symmetric matrix expressing the similarity between nodes
single.eav.score
computes the Empirical Average score using a kernel matrix or a symmetric matrix expressing the similarity between nodes
single.WSLD.score
computes the Weighted Sum with Linear Decay score for a single vertex using a kernel matrix or a symmetric matrix expressing the similarity between nodes
Methods for scoring multiple vertices
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24  # Computation of scores using STRING data with respect to
# the FunCat category 11.02.01 rRNA synthesis
library(bionetdata);
data(Yeast.STRING.data);
data(Yeast.STRING.FunCat);
labels < Yeast.STRING.FunCat[,"11.02.01"];
n < length(labels);
ind.pos < which(labels==1);
# NNscore computed directly on the STRING matrix on the first yeast gene YJR121W
s < single.NN.score(Yeast.STRING.data, 1, ind.pos);
## Not run:
# NNscore computed on the 1 step and 2step random walk kernel matrix
K < rw.kernel(Yeast.STRING.data);
sK < single.NN.score(K, 1, ind.pos);
K2 < p.step.rw.kernel(K, p=2);
sK2 < single.NN.score(K2, 1, ind.pos);
# WSLDscore computed directly on the STRING matrix on the first yeast gene YJR121W
s < single.WSLD.score(Yeast.STRING.data, 1, ind.pos);
# WSLDscores computed on the 1 step and 2step random walk kernel matrix
sK < single.WSLD.score(K, 1, ind.pos);
sK2 < single.WSLD.score(K2, 1, ind.pos);
## End(Not run)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.