0
votes

I have a precision matrix of a multivariate gaussian distribution. I want to draw the graph of the variable from this precision matrix. So if the precision matrix is of size 100x100, I have 100 random variables. The non zero entries in the precision matrix means there is an edge between the two variables. If the entry is 0, it means there is no edge. How can I plot such a graph in matlab?

2
I searched for something like this for about 2 month ago. I didn't find suitable toolbox. So,I use gephi(gephi.org) software for this purpose. first, you should convert your matrix to some file format suitable to gephi like gml.Then,open the file in gephi. - Fatime

2 Answers

0
votes

It sounds like you've got an adjacency matrix (what you're calling a precision matrix).

And if so, there are some third party packages that will allow you to draw both directed and undirected graphs in MATLAB. Here's one from UBC. I think the function you'll want to use is drawNetwork(adj), where adj is your precision matrix.

0
votes

If A is your "precision matrix", you can visualize its nonzero elements (called a sparsity pattern) with

spy(A)

This will produce an image of dots in a new figure window, one dot for each nonzero entry in A.

The precision matrix is an inverse of a covariance and its sparsity pattern can compactly represent the correlation structure among jointly random multivariate gaussians. A longer discussion can be found here: See NRH's comment on this thread--especially the link on partial correlations