image.hglasso: Image plot of an object of class 'hglasso', 'hcov', or 'hbn'

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/image.hglasso.R

Description

This function plots a hglasso or hcov — the estimated matrix V and Z from hglasso, hcov, or hbn

Usage

1
2
## S3 method for class 'hglasso'
image(x, ...) 

Arguments

x

an object of class hglasso, hcov, or hbn.

...

additional parameters to be passed to image.

Details

The estimated inverse covariance matrix from hglasso, covariance matrix from hcov, and estimated binary network hbn can be decomposed as Z + V + t(V), where V is a matrix that contains hub nodes. This function creates image plots of Z and V.

Author(s)

Kean Ming Tan

References

Tan et al. (2014). Learning graphical models with hubs. To appear in Journal of Machine Learning Research. arXiv.org/pdf/1402.7349.pdf.

See Also

plot.hglasso summary.hglasso hglasso hcov hbn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
##############################################
# Example from Figure 1 in the manuscript
# A toy example to illustrate the results from 
# Hub Graphical Lasso
##############################################
library(mvtnorm)
set.seed(1)
n=100
p=100

# A network with 4 hubs
Theta<-HubNetwork(p,0.99,4,0.1)$Theta

# Generate data matrix x
x <- rmvnorm(n,rep(0,p),solve(Theta))
x <- scale(x)

# Run Hub Graphical Lasso to estimate the inverse covariance matrix
res1 <- hglasso(cov(x),0.3,0.2,2)

# image plots for the matrix V and Z
image(res1)
dev.off()


hglasso documentation built on May 19, 2017, 10:49 p.m.
Search within the hglasso package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.