Multiple vertex score functions

Share:

Description

Methods to compute score functions for multiple vertices of the graph

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## S4 method for signature 'graph'
NN.score(RW, x, x.pos, auto = FALSE, norm = TRUE)
## S4 method for signature 'matrix'
NN.score(RW, x, x.pos, auto = FALSE, norm = TRUE)
## S4 method for signature 'graph'
KNN.score(RW, x, x.pos, k = 3, auto = FALSE, norm = TRUE)
## S4 method for signature 'matrix'
KNN.score(RW, x, x.pos, k = 3, auto = FALSE, norm = TRUE)
## S4 method for signature 'graph'
eav.score(RW, x, x.pos, auto = FALSE, norm = TRUE)
## S4 method for signature 'matrix'
eav.score(RW, x, x.pos, auto = FALSE, norm = TRUE)
## S4 method for signature 'graph'
WSLD.score(RW, x, x.pos, d = 2, auto = FALSE, norm = TRUE)
## S4 method for signature 'matrix'
WSLD.score(RW, x, x.pos, d = 2, auto = FALSE, norm = TRUE)

Arguments

RW

matrix. It must be a kernel matrix or a symmetric matrix expressing the similarity between nodes

x

vector of integer. Indices corresponding to the elements 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)

norm

boolean. If TRUE (def.) the scores are normalized between 0 and 1.

Details

The methods compute the scores for multiple vertices according to NN, KNN, Empirical Average or WSLD score (see reference for bibliographic details). Note that the argument x indicates the set of nodes for which the score must be computed. The vector x represents the indices of the rows of the matrix RW corresponding to the vertices for which the scores must be computed. If x = 1:nrow(RW) the scores for all the vertices of the graph are computed.

Value

NN.score: a numeric vector with the NN scores of the vertices. The names of the vector correspond to the indices x

KNN.score: a numeric vector with the KNN scores of the vertices. The names of the vector correspond to the indices x

eav.score: a numeric vector with the Empirical Average score of the vertices. The names of the vector correspond to the indices x

WSLD.score: a numeric vector with the Weighted Sum with Linear Decay score (WSLD) of the vertices. The names of the vector correspond to the indices x

Methods

signature(RW = "graph")

NN.score computes the NN score for multiple vertices using a graph of class graph (hence including objects of class graphAM and graphNEL from the package graph)

KNN.score computes the KNN score for multiple vertices using a graph of class graph (hence including objects of class graphAM and graphNEL from the package graph)

eav.score computes the Empirical Average score for multiple verticesusing a graph of class graph (hence including objects of class graphAM and graphNEL from the package graph)

WSLD.score computes the Weighted Sum with Linear Decay score for multiple vertices using a graph of class graph (hence including objects of class graphAM and graphNEL from the package graph)

signature(RW = "matrix")

NN.score computes the NN score for multiple vertices using a kernel matrix or a symmetric matrix expressing the similarity between nodes

KNN.score computes the KNN score for multiple vertices using a kernel matrix or a symmetric matrix expressing the similarity between nodes

eav.score computes the Empirical Average score multiple for vertices using a kernel matrix or a symmetric matrix expressing the similarity between nodes

WSLD.score computes the Weighted Sum with Linear Decay score for multiple vertices using a kernel matrix or a symmetric matrix expressing the similarity between nodes

References

Re M, Mesiti M, Valentini G: A fast ranking algorithm for predicting gene functions in biomolecular networks. IEEE ACM Trans Comput Biol Bioinform 2012, 9(6):1812-1818.

Insuk Lee, Bindu Ambaru, Pranjali Thakkar, Edward M. Marcotte, and Seung Y. Rhee. Nature Biotechnology 28, 149-156, 2010

See Also

Methods for scoring a single vertex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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-scores computed directly on the STRING matrix 
s <- NN.score(Yeast.STRING.data, 1:n, ind.pos);
## Not run: 
# NN-scores computed on the 1 step and 2-step random walk kernel matrix
K <- rw.kernel(Yeast.STRING.data);
sK <- NN.score(K, 1:n, ind.pos);
K2 <- p.step.rw.kernel(K, p=2);
sK2 <- NN.score(K2, 1:n, ind.pos);
# WSLD-scores computed directly on the STRING matrix 
s <- WSLD.score(Yeast.STRING.data, 1:n, ind.pos);
# WSLD-scores computed on the 1 step and 2-step random walk kernel matrix
sK <- WSLD.score(K, 1:n, ind.pos);
sK2 <- WSLD.score(K2, 1:n, ind.pos);

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.