Learn R Programming

fasjem (version 1.1.2)

net.neighbors: Get neighbors of a node in each graph in the input list of multiple graphs

Description

For each graph in the input list of multiple graphs, returns the name of neighbor nodes connected to a given node.

Usage

net.neighbors(theta, index)

Arguments

theta

An input list of multiple graphs. Each graph is represented as a pXp matrix. (For example, the result of the fasjem algorithm: a list of pXp matrices in which each matrix represents an estimated sparse inverse covariance matrix.)

index

The row number of the node to be investigated.

Value

neighbors, a length K list. Each element in the list is a vector including row names of the neighbor nodes for the index node in each graph in the input list of multiple graphs.

References

Beilun Wang, Ji Gao, Yanjun Qi (2017). A Fast and Scalable Joint Estimator for Learning Multiple Related Sparse Gaussian Graphical Models. <http://proceedings.mlr.press/v54/wang17e/wang17e.pdf>

Examples

Run this code
# NOT RUN {
## load an example multi-task dataset with K=2 tasks, p=100 features, and n=200 samples per task:
data(exampleData)
##run
result = fasjem(X = exampleData, method = "fasjem-g", 0.1, 0.1, 0.1, 0.05, 10)
## get neighbors of node 50:
net.neighbors(result, index=50)
# }

Run the code above in your browser using DataLab