@@ -15,16 +15,23 @@ The goal of **grasps** is to provide a collection of statistical methods that
1515incorporate both element-wise and group-wise penalties to estimate a precision
1616matrix, making them user-friendly and useful for researchers and practitioners.
1717
18- $$ \hat{\Omega}(\lambda,\alpha,\gamma) = {\arg\min}_{\Omega \succ 0}
19- \{ -\log\det(\Omega) + \text{tr}(S\Omega) + \lambda P_{\alpha,\gamma}(\Omega) \}, $$
20-
21- $$ P_{\alpha,\gamma}(\Omega)
22- = \alpha P^\text{idv}_\gamma(\Omega) + (1-\alpha) P^\text{grp}_\gamma(\Omega), $$
23-
24- $$ P^\text{idv}_\gamma(\Omega) = \sum_{i,j} p_\gamma(\vert\omega_{ij}\vert), $$
25-
26- $$ P^\text{grp}_\gamma(\Omega)
27- = \sum_{g,g^\prime} p_\gamma(\Vert\Omega_{gg^\prime}\Vert_F). $$
18+ $$
19+ \hat{\Omega}(\lambda,\alpha,\gamma) = {\arg\min}_{\Omega \succ 0}
20+ \left\{ -\log\det(\Omega) + \text{tr}(S\Omega)
21+ + \mathcal{P}_{\lambda,\alpha,\gamma}(\Omega) \right\},
22+ $$
23+ $$
24+ \mathcal{P}_{\lambda,\alpha,\gamma}(\Omega)
25+ = \alpha \mathcal{P}^\text{idv}_{\lambda,\gamma}(\Omega) + (1-\alpha) \mathcal{P}^\text{grp}_{\lambda,\gamma}(\Omega),
26+ $$
27+ $$
28+ \mathcal{P}^\text{idv}_{\lambda,\gamma}(\Omega)
29+ = \sum_{i,j} P_{\lambda,\gamma}(\lvert\omega_{ij}\rvert),
30+ $$
31+ $$
32+ \mathcal{P}^\text{grp}_{\lambda,\gamma}(\Omega)
33+ = \sum_{g,g^\prime} P_{\lambda,\gamma}(\lVert\Omega_{gg^\prime}\rVert_F).
34+ $$
2835
2936For more details, see the vignette
3037[ Penalized Precision Matrix Estimation in grasps] ( https://shiying-xiao.com/grasps/articles/pen_est#sparse-group-estimator ) .
@@ -77,7 +84,7 @@ library(grasps)
7784set.seed(1234 )
7885
7986# # block-structured precision matrix based on SBM
80- sim <- gen_prec_sbm(d = 30 , K = 3 ,
87+ sim <- gen_prec_sbm(p = 30 , K = 3 ,
8188 within.prob = 0.25 , between.prob = 0.05 ,
8289 weight.dists = list (" gamma" , " unif" ),
8390 weight.paras = list (c(shape = 20 , rate = 10 ),
@@ -95,18 +102,18 @@ res <- grasps(X = X, membership = sim$membership, penalty = "adapt", crit = "HBI
95102plot(res )
96103```
97104
98- <img src =" man/figures/README-unnamed-chunk-2-1.png " width =" 100% " />
105+ <img src =" man/figures/README-unnamed-chunk-2-1.png " alt = " " width =" 100% " />
99106
100107``` r
101108
102109# # performance
103110performance(hatOmega = res $ hatOmega , Omega = sim $ Omega )
104111# > measure value
105112# > 1 sparsity 0.9103
106- # > 2 Frobenius 24.6796
107- # > 3 KL 7.2063
108- # > 4 quadratic 54.1949
109- # > 5 spectral 13.1336
113+ # > 2 Frobenius 24.6557
114+ # > 3 KL 7.2100
115+ # > 4 quadratic 54.4284
116+ # > 5 spectral 13.1234
110117# > 6 TP 22.0000
111118# > 7 TN 370.0000
112119# > 8 FP 17.0000
0 commit comments