score.single.vertex-methods {RANKS} | R Documentation |
Single vertex score functions
Description
Methods to compute score functions applied to a single vertex of the graph
Usage
## 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)
Arguments
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 |
Details
single.NN.score
computes the NN score for a single vertex:
where is the set of positive vertices.
single.KNN.score
compute KNN score for a single vertex:
single.eav.score
computes the Empirical Average score for a single vertex:
single.WSLD.score
computes the WSLD score for a single vertex:
Let be the kth rank order index w.r.t.
, and
, then:
Value
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
Methods
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 nodessingle.KNN.score
computes the KNN score for a single vertex using a kernel matrix or a symmetric matrix expressing the similarity between nodessingle.eav.score
computes the Empirical Average score using a kernel matrix or a symmetric matrix expressing the similarity between nodessingle.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
See Also
Methods for scoring multiple vertices
Examples
# 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);
# NN-score computed directly on the STRING matrix on the first yeast gene YJR121W
s <- single.NN.score(Yeast.STRING.data, 1, ind.pos);
# NN-score computed on the 1 step and 2-step 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);
# WSLD-score computed directly on the STRING matrix on the first yeast gene YJR121W
s <- single.WSLD.score(Yeast.STRING.data, 1, ind.pos);
# WSLD-scores computed on the 1 step and 2-step random walk kernel matrix
sK <- single.WSLD.score(K, 1, ind.pos);
sK2 <- single.WSLD.score(K2, 1, ind.pos);