Precision Matrix of Nearest-Neighbor Graph

Share:

Description

Generate precision matrix of nearest-neighbor network following the set-up in Li and Gui (2006) and Lee and Liu (2006).

Usage

1
NeighborOmega(p, sd = 1, knn = 4, norm.type = 2)

Arguments

p

dimension of generated precision matrix.

sd

seed for random number generation. Default is 1.

knn

sparsity of precision matrix, i.e., matrix is generated from a knn nearest-neighbor graph. knn should be less than p. Default is 4.

norm.type

normalization methods of generated precision matrix, i.e., Ω_{11}=1 if norm.type = 1 and ||Ω||_F =1 if norm.type = 2. Default value is 2.

Details

For a knn nearest-neighbor graph, this function first randomly picks p points from a unit square and computes all pairwise distances among the points. Then it searches for the knn nearest-neighbors of each point and a pair of symmetric entries in the precision matrix that has a random chosen value from [-1, -0.5] U [0.5, 1]. Finally, to ensure positive definite property, it normalizes the matrix as Ω <- Ω + (λ (Ω)+0.2) 1_p where λ (.) refers to the samllest eigenvalue.

Value

A precision matrix generated from the knn nearest-neighor graph.

Author(s)

Will Wei Sun, Zhaoran Wang, Xiang Lyu, Han Liu, Guang Cheng.

See Also

ChainOmega

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
m.vec = c(5,5,5)  # dimensionality of a tensor 
n = 5   # sample size 
knn=4 # sparsity 

Omega.true.list = list()

for ( k in 1:length(m.vec)){
  Omega.true.list[[k]] = NeighborOmega(m.vec[k],knn=4, sd=k*100,norm.type=2)
}
Omega.true.list  # a list of length 3 contains precision matrices from 4-nearnest neighbor graph