getSampleAdja: Get The Sample Adjacency.

Description Usage Arguments Value See Also Examples

View source: R/getSampleAdja.R

Description

The function computes the adjacency of the edges computed in each step of the "loocv" or the "kfoldCV" function. If the variance of each edge shall be taken into account use "getSampleAdjaMAD", otherwise "getSampleAdja".

Usage

1
2
3
getSampleAdjaMAD(edges_all, n, annot_node, method = median,
                 method2 = mad, septype = "->")
getSampleAdja(edges_all, n, annot_node, method = median, septype = "->")

Arguments

edges_all

The inferred edges using the "loocv" or the "kfoldCV" function.

n

Integer: the number of nodes.

annot_node

Vector of character strings: the annoation of the nodes.

method

Character string: the method used to summarize the edges of the individual steps. Default: "median".

method2

Character string: the method used for the computation of the variation of the edges of the individual steps. Default: "mad".

septype

Character string: the type of separation of two nodes in the annot string vector. Default: "->".

Value

Numeric matrix: the adjacency matrix.

See Also

loocv, kfoldCV

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# compute random edge weights
edges_all <- matrix(rnorm(5*6), nrow=5, ncol=6)

# annotation of the edges as returned by "loocv" and kfoldCV
colnames(edges_all) <- c("1->2", "1->3", "2->1", "2->3", "3->1", "3->2")

# annotation of the nodes
annot_node <- c(1,2,3)
getSampleAdjaMAD(edges_all, n=3, annot_node, method = "median", method2 = "mad", septype = "->")
  
getSampleAdja(edges_all, n=3, annot_node, method = "median", septype = "->")

lpNet documentation built on Nov. 8, 2020, 7:08 p.m.