embed2007CYT: Directed Graph Embedding by Chen, Yang, and Tang (2007)

Description Usage Arguments Value References Examples

View source: R/embedding_embed2007CYT.R

Description

Find a low-dimensional embedding of the network given an asymmetric/directed graph. For simplicity, this function only accepts a network of \lbrace 0, 1 \rbrace binary edges.

Usage

1
embed2007CYT(graph, ndim = 2, alpha = 0.01)

Arguments

graph

one of the followings; (1) an igraph object, (2) a network object, or (3) an (N\times N) adjacency matrix.

ndim

an embedding dimension for a given graph (default: 2).

alpha

perturbation factor \in (0,1) (default: 0.01).

Value

a named list containing

embed

an (N\times ndim) matrix of embedded coordinates.

References

\insertRef

chen_directed_2007T4network

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## create a simple directed ring graph
library(igraph)
mygraph = graph.ring(10, directed=TRUE)

## embed in R^2
embed2  = embed2007CYT(mygraph)$embed

## visualize the results
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,2), pty="s")
plot(mygraph, main="directed ring graph")
plot(embed2, pch=19, main="2-dimensional embedding",
     xlab="dimension 1", ylab="dimension 2")
par(opar)
 

kisungyou/T4network documentation built on Dec. 21, 2021, 6:44 a.m.