Interactive demo · Statistical Learning: Theory and Methods · Chapter 17

Zeros of the precision matrix, not of the covariance

For a Gaussian vector, variables j and k are independent given all the others exactly when θjk = 0 in Θ = Σ−1. Here every edge of a graph gets the same partial correlation ρ (so Θ = I − ρA, with A the adjacency matrix). The precision matrix is as sparse as the graph; the covariance matrix Σ = Θ−1 is zero only between different connected components. In the fitting mode, Algorithm 17.1 finds the maximum-likelihood Σ̂ for the graph: it copies S on the edges and the diagonal and fills the missing edges so that Σ̂−1 has its zeros there.

Graph

Partial correlation on every edge ρ

Pair of variables

Data for Algorithm 17.1

Sample size N and seed

Try these

Θ has unit diagonal, so ρ is minus each edge's entry, and ρ is kept inside the range where Θ is positive definite (1 − ρμ > 0 for every eigenvalue μ of A). Separating sets are found by searching all subsets for the smallest one. Algorithm 17.1: for each node in turn, solve W*11β* = s*12 on its neighbours, pad β with zeros and set w12 = W11β; a sweep visits every node once. Samples are drawn from N(0, Σ) with the seeded generator of the course, and S uses the divisor N.

In the lecture notes