# score.single.vertex-methods: Single vertex score functions

### Description

Methods to compute score functions applied to a single vertex 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' 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 K(x,x) + K(x_i,x_i) are computed, otherwise are discarded (default)

### Details

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 * (k-1))) * K(x, x_{jk})]

### 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 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); # NN-score computed directly on the STRING matrix on the first yeast gene YJR121W s <- single.NN.score(Yeast.STRING.data, 1, ind.pos); ## Not run: # 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); ## End(Not run)