penalty: Penalty functions for graph structure search

Description Details References Examples

Description

Collection of penalty functions employed in the structural-EM algorithm and penalized maximum likelihood estimation for graph structure search.

Details

The choice of the penalty function is via argument penalty in the functions searchGGM and mixGGM. Possible options are "bic" (default), "ebic", "erdos", and "power". Functions "ebic", "erdos", and "power" depend also on a hyperparameter beta which can be set using the corresponding argument in searchGGM and mixGGM.

Let denote with E the number of non-zero entries in the adjacency matrix corresponding to the graph structure of a covariance/concentration graph model (i.e. the number of edges); n and V denote number of observations and number of variables (or nodes). The above options correspond to the following penalty functions:

An user-defined penalty function can be also provided in input of argument penalty in the functions searchGGM and mixGGM. In this case, the penalty must be an object of class "function" and have as argument graph, like for example "f <- function(graph, beta)"; see "Examples".

See also searchGGM and mixGGM for some examples.

References

Fop, M., Murphy, T.B., and Scrucca, L. (2019) Model-based clustering with sparse covariance matrices. **Statistics and Computing**, 29:4, 791–819.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# fit concentration graph model with power law penalty
data(ability.cov)
n <- ability.cov$n.obs
mod1 <- searchGGM(S = ability.cov$cov, n = ability.cov$n.obs,
                  model = "concentration", penalty = "power", beta = 2*log(n))
mod1
plot(mod1)


## Not run: 

# two disconnected blocks of correlated variables
library(MASS)
V <- 10
n <- 500
mu <- rep(0, V)
sigma <- matrix(0.9, V,V)
diag(sigma) <- 1
x <- cbind( MASS::mvrnorm(n, mu, sigma),
            MASS::mvrnorm(n, mu, sigma) )
#
# fit a covariance graph with erdos penalty
mod2 <- searchGGM(x, model = "covariance",
                  penalty = "erdos")
plot(mod2, "adjacency")


# user defined penalty function
data(iris)
x <- iris[,-5]
n <- nrow(x)
V <- ncol(x)
ref <- matrix(0, V, V)
#
# penalize graphs different from a reference graph structure
myPenalty <- function(graph, beta)
{
  beta * sum( abs(graph - ref) )
}
#
mod3 <- mixGGM(x, K = 3, model = "covariance",
              penalty = myPenalty, beta = 2*V*log(n))
plot(mod3)


## End(Not run)

michaelfop/mixggm documentation built on July 26, 2019, 8:57 p.m.