You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: glasso_on_random_graphs.Rmd
+14-11
Original file line number
Diff line number
Diff line change
@@ -15,11 +15,11 @@ library(pracma)
15
15
16
16
# Experiment on random sparse graphs
17
17
18
-
Here, we test glasso on some random sparse graphs and draw ROC curves to select an appropriate value for the parameter rho.
18
+
Here, we test glasso on some random sparse graphs and draw ROC curves to select an appropriate value for the parameter `rho`.
19
19
20
20
21
21
22
-
Generate Sigma and Theta (Sigma^{-1}) corresponding to a graph of size p and with a sparsity_level % non null coefficients in Theta. We use the fact that a diagonally dominant matrix is positive, and add 0.5 on the diagonal in order to make the smallest eigenvalue >0.
22
+
Generate `Sigma` and `Theta` (`Sigma^{-1}`) corresponding to a graph of size `p` and with a sparsity_level % non null coefficients in `Theta`. We use the fact that a diagonally dominant matrix is positive, and add `0.5` on the diagonal in order to make the smallest eigenvalue `>0`.
23
23
24
24
```{r}
25
25
# Generate a sparse positive semidefinite matrix
@@ -39,7 +39,7 @@ res <- genThetaSigma(p)
39
39
40
40
```
41
41
42
-
Use glasso package to compute the TPR and FPR for different values of rho on one graph
42
+
Use glasso package to compute the TPR and FPR for different values of `rho` on one graph
43
43
44
44
```{r pressure, echo=FALSE}
45
45
experiment <-function(p,n,lrho,thr=0.0001){
@@ -100,7 +100,7 @@ lines(c(0, 1), c(0, 1))
100
100
title("ROC curve for a test example")
101
101
```
102
102
103
-
Repeat the experiment on N different graphs
103
+
Repeat the experiment on `N` different graphs
104
104
105
105
```{r, echo=FALSE}
106
106
# Repeat experiment a given number of times N and compute statistics
@@ -164,7 +164,7 @@ if(print_to_eps){
164
164
}
165
165
```
166
166
167
-
Compute the theoretical rho as in Banerjee et al. (2008)
167
+
Compute the theoretical `rho` as in Banerjee et al. (2008), depending on a parameter `alpha`.
0 commit comments