Skip to content

Commit bad2fbd

Browse files
committed
doc: use p instead of d for dimension
1 parent 9b5709b commit bad2fbd

7 files changed

Lines changed: 65 additions & 68 deletions

File tree

R/gen_prec_sbm.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@
115115
#' The weighted adjacency matrix is symmetrized and used as the precision matrix
116116
#' \eqn{\Omega_0}. Since arbitrary block-structured weights may not be positive
117117
#' definite, a diagonal adjustment is applied to control the eigenvalue spectrum.
118-
#' Specifically, let \eqn{\lambda_{\max}} and \eqn{\lambda_{\min}} denote
118+
#' Specifically, let \eqn{\lambda_\max} and \eqn{\lambda_\min} denote
119119
#' the largest and smallest eigenvalues of a matrix. A non-negative numeric
120120
#' value \eqn{\tau} is added to the diagonal so that
121121
#' \deqn{
122122
#' \left\{
123123
#' \begin{array}{l}
124-
#' \dfrac{\lambda_{\max}(\Omega_0 + \tau I)}{\lambda_{\min}(\Omega_0 + \tau I)}
124+
#' \dfrac{\lambda_\max(\Omega_0 + \tau I)}{\lambda_\min(\Omega_0 + \tau I)}
125125
#' \leq \texttt{cond.target} \\[1em]
126-
#' \lambda_{\min}(\Omega_0 + \tau I) > 0 \\[.5em]
126+
#' \lambda_\min(\Omega_0 + \tau I) > 0 \\[.5em]
127127
#' \tau \geq 0
128128
#' \end{array}
129129
#' \right.

R/grasps.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,21 @@
7676
#' \code{lambda} values to generate when \code{lambda = NULL}.
7777
#'
7878
#' @param lambda.min.ratio A numeric value > 0 (default = 0.01) specifying
79-
#' the fraction of the maximum \code{lambda} value \eqn{\lambda_{max}} to
80-
#' generate the minimum \code{lambda} \eqn{\lambda_{min}}.
79+
#' the fraction of the maximum \code{lambda} value \eqn{\lambda_\max} to
80+
#' generate the minimum \code{lambda} \eqn{\lambda_\min}.
8181
#' If \code{lambda = NULL}, a \code{lambda} grid of length \code{nlambda} is
82-
#' automatically generated on a log scale, ranging from \eqn{\lambda_{max}}
83-
#' down to \eqn{\lambda_{min}}.
82+
#' automatically generated on a log scale, ranging from \eqn{\lambda_\max}
83+
#' down to \eqn{\lambda_\min}.
8484
#'
8585
#' @param growiter.lambda An integer (default = 30) specifying the maximum
8686
#' number of exponential growth steps during the initial search for an
87-
#' admissible upper bound \eqn{\lambda_{\max}}.
87+
#' admissible upper bound \eqn{\lambda_\max}.
8888
#'
8989
#' @param tol.lambda A numeric value > 0 (default = 1e-03) specifying
9090
#' the relative tolerance for the bisection stopping rule on the interval width.
9191
#'
9292
#' @param maxiter.lambda An integer (default = 50) specifying the maximum number
93-
#' of bisection iterations in the line search for \eqn{\lambda_{\max}}.
93+
#' of bisection iterations in the line search for \eqn{\lambda_\max}.
9494
#'
9595
#' @param rho A numeric value > 0 (default = 2) specifying the ADMM
9696
#' augmented-Lagrangian penalty parameter (often called the ADMM step size).
@@ -150,7 +150,7 @@
150150
#' \item{iterations}{The number of ADMM iterations.}
151151
#' \item{lambda.grid}{The actual lambda grid used in the program.}
152152
#' \item{alpha.grid}{The actual alpha grid used in the program.}
153-
#' \item{lambda.safe}{The bisection-refined upper bound \eqn{\lambda_{\max}},
153+
#' \item{lambda.safe}{The bisection-refined upper bound \eqn{\lambda_\max},
154154
#' corresponding to \code{alpha.grid}, when \code{lambda = NULL}.}
155155
#' \item{loss}{The optimal k-fold loss when \code{crit = "CV"}.}
156156
#' \item{CV.loss}{Matrix of CV losses, with rows for parameter combinations and

R/line_search_lambda_max.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#' @description
44
#' Given a list of off-diagonal blocks \code{blockList} from the sample
55
#' covariance (or a related matrix), this routine finds a \strong{sharp}
6-
#' \eqn{\lambda_{\max}} by bisection so that the KKT condition
6+
#' \eqn{\lambda_\max} by bisection so that the KKT condition
77
#' \deqn{\Vert\text{soft}(B, \lambda\alpha)\Vert_F \leq \lambda(1-\alpha)}
88
#' holds for every block \eqn{B} in \code{blockList}, where
99
#' \eqn{\text{soft}(\cdot, t)} denotes element-wise soft-thresholding with
@@ -13,15 +13,15 @@
1313
#' used in the group KKT check.
1414
#'
1515
#' @param lambda.safe A numeric value representing a safe (but possibly loose)
16-
#' upper bound for \eqn{\lambda_{\max}}. If the value is negative, the search
16+
#' upper bound for \eqn{\lambda_\max}. If the value is negative, the search
1717
#' starts from 1.
1818
#'
1919
#' @param alpha A numeric value in (0,1) specifying the mixture weight between
2020
#' the individual (L1) and group (L2) penalties in sparse-group formulations.
2121
#'
2222
#' @param growiter An integer specifying the maximum number of exponential
2323
#' growth steps during the initial search for an admissible upper bound
24-
#' \eqn{\lambda_{\max}}.
24+
#' \eqn{\lambda_\max}.
2525
#'
2626
#' @param tol A numeric value > 0 specifying the relative tolerance for
2727
#' the bisection stopping rule on the interval width.
@@ -30,7 +30,7 @@
3030
#' iterations.
3131
#'
3232
#' @return
33-
#' A numeric value giving the bisection-refined upper bound \eqn{\lambda_{\max}}.
33+
#' A numeric value giving the bisection-refined upper bound \eqn{\lambda_\max}.
3434
#'
3535
#' @details
3636
#' The procedure first grows an upper bound starting from \code{lambda.safe}

man/gen_prec_sbm.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/grasps.Rd

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/crit.qmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ parameter $\lambda$ to balance sparsity (number of edges) and model fit
2929
## Background: Negative Log-Likelihood
3030

3131

32-
In a Gaussian graphical model (GGM), the data matrix $X_{n \times d}$
32+
In a Gaussian graphical model (GGM), the data matrix $X_{n \times p}$
3333
consists of $n$ independent and identically distributed observations
34-
$X_1, \dots, X_n$ drawn from $N_d(\mu,\Sigma)$.
34+
$X_1, \dots, X_n$ drawn from $N_p(\mu,\Sigma)$.
3535
Let $\Omega = \Sigma^{-1}$ denote the precision matrix, and define the empirical
3636
covariance matrix as
3737
$S = n^{-1} \sum_{i=1}^n (X_i-\bar{X})(X_i-\bar{X})^\top$.
@@ -72,7 +72,7 @@ $$
7272
$$
7373
\hat{\Omega}_{\mathrm{EBIC}} = {\arg\min}_{\Omega} \left\{
7474
2\,\mathrm{nll}(\Omega) + \log(n)\,\lvert E(\Omega) \rvert +
75-
4\,\xi\,\log(d)\,\lvert E(\Omega) \rvert \right\},
75+
4\,\xi\,\log(p)\,\lvert E(\Omega) \rvert \right\},
7676
$$
7777

7878

@@ -85,7 +85,7 @@ the classic BIC.
8585

8686
$$
8787
\hat{\Omega}_{\mathrm{HBIC}} = {\arg\min}_{\Omega} \left\{
88-
2\,\mathrm{nll}(\Omega) + \log[\log(n)]\,\log(d)\,\lvert E(\Omega) \rvert \right\}.
88+
2\,\mathrm{nll}(\Omega) + \log[\log(n)]\,\log(p)\,\lvert E(\Omega) \rvert \right\}.
8989
$$
9090

9191

vignettes/pen_est.qmd

Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ Consider the following setting:
2424

2525

2626
- **Gaussian graphical model (GGM) assumption:** \
27-
The data $X_{n \times d}$ consists of independent and identically distributed
28-
samples $X_1, \dots, X_n \sim N_d(\mu,\Sigma)$.
27+
The data $X_{p \times p}$ consists of independent and identically distributed
28+
samples $X_1, \dots, X_n \sim N_p(\mu,\Sigma)$.
2929

3030

3131
- **Disjoint group structure:** \
32-
The $d$ variables can be partitioned into disjoint groups.
32+
The $p$ variables can be partitioned into disjoint groups.
3333

3434

3535
- **Goal:** \
36-
Estimate the precision matrix $\Omega = \Sigma^{-1} = (\omega_{ij})_{d \times d}$.
36+
Estimate the precision matrix $\Omega = \Sigma^{-1} = (\omega_{ij})_{p \times p}$.
3737

3838

3939
## Sparse-Group Estimator
@@ -42,15 +42,16 @@ Consider the following setting:
4242
\begin{gather}
4343
\hat{\Omega}(\lambda,\alpha,\gamma)
4444
= {\arg\min}_{\Omega \succ 0} \left\{ -\log\det(\Omega) + \text{tr}(S\Omega)
45-
+ \lambda P_{\alpha,\gamma}(\Omega) \right\},
45+
+ \mathcal{P}_{\lambda,\alpha,\gamma}(\Omega) \right\},
4646
\\[10pt]
47-
P_{\alpha,\gamma}(\Omega)
48-
= \alpha P^\text{idv}_\gamma(\Omega) + (1-\alpha) P^\text{grp}_\gamma(\Omega),
47+
\mathcal{P}_{\lambda,\alpha,\gamma}(\Omega)
48+
= \alpha \mathcal{P}^\text{idv}_{\lambda,\gamma}(\Omega) + (1-\alpha) \mathcal{P}^\text{grp}_{\lambda,\gamma}(\Omega),
4949
\\[10pt]
50-
P^\text{idv}_\gamma(\Omega) = \sum_{i,j} p_\gamma(\vert\omega_{ij}\vert),
50+
\mathcal{P}^\text{idv}_{\lambda,\gamma}(\Omega)
51+
= \sum_{i,j} P_{\lambda,\gamma}(\lvert\omega_{ij}\rvert),
5152
\\[5pt]
52-
P^\text{grp}_\gamma(\Omega)
53-
= \sum_{g,g^\prime} p_\gamma(\Vert\Omega_{gg^\prime}\Vert_F).
53+
\mathcal{P}^\text{grp}_{\lambda,\gamma}(\Omega)
54+
= \sum_{g,g^\prime} P_{\lambda,\gamma}(\lVert\Omega_{gg^\prime}\rVert_F).
5455
\end{gather}
5556

5657

@@ -60,6 +61,7 @@ where:
6061
- $S = n^{-1} \sum_{i=1}^n (X_i-\bar{X})(X_i-\bar{X})^\top$ is the empirical
6162
covariance matrix.
6263

64+
6365
- $\lambda \geq 0$ is the global regularization parameter controlling overall
6466
shrinkage.
6567

@@ -68,41 +70,40 @@ where:
6870
element-wise and block-wise penalties.
6971

7072

71-
- $\gamma$ is the additional parameter controlling the curvature and effective
72-
degree of nonconvexity of the penalty.
73+
- $\gamma$ is the additional parameter for non-convex penalties, controlling
74+
the degree of nonconvexity (or concavity) of the penalty function.
7375

7476

75-
- $P_{\alpha,\gamma}(\Omega)$ is a generic bi-level penalty template that can
76-
incorporate convex or non-convex regularizers while preserving the intrinsic
77-
group structure among variables.
77+
- $\mathcal{P}_{\lambda,\alpha,\gamma}(\Omega)$ is a generic bi-level penalty
78+
template that combines element-wise and block-wise regularization, allowing
79+
convex or non-convex regularizers while preserving the intrinsic group
80+
structure among variables.
7881

7982

80-
- $P^\text{idv}_\gamma(\Omega)$ is the element-wise individual penalty component.
83+
- $\mathcal{P}^\text{idv}_{\lambda,\gamma}(\Omega)$ is the element-wise
84+
individual penalty component.
8185

8286

83-
- $P^\text{grp}_\gamma(\Omega)$ is the block-wise group penalty component.
87+
- $\mathcal{P}^\text{grp}_{\lambda,\gamma}(\Omega)$ is the block-wise
88+
group penalty component.
8489

8590

86-
- $p_\gamma(\cdot)$ is a penalty kernel parameterized by $\gamma$.
91+
- $P_{\lambda,\gamma}(\cdot)$ is the penalty function.
8792

8893

8994
- $\Omega_{gg^\prime}$ is the submatrix of $\Omega$ with the rows from group $g$
9095
and columns from group $g^\prime$.
9196

9297

93-
- The Frobenius norm $\Vert\Omega\Vert_F$ is defined as
94-
$\Vert\Omega\Vert_F = (\sum_{i,j} \vert\omega_{ij}\vert^2)^{1/2} = [\text{tr}(\Omega^\top\Omega)]^{1/2}$.
98+
- The Frobenius norm $\lVert\Omega\rVert_F$ is defined as
99+
$\lVert\Omega\rVert_F = (\sum_{i,j} \lvert\omega_{ij}\rvert^2)^{1/2} = [\text{tr}(\Omega^\top\Omega)]^{1/2}$.
95100

96101

97102
<div class="note">
98103
**Note**:
99104

100-
+ The regularization parameter $\lambda$ acts as the scale factor for the entire
101-
penalty term $\lambda P_{\alpha,\gamma}(\Omega)$.
102-
103-
104-
+ The penalty kernel $p_\gamma(\cdot)$ is the shape function that governs
105-
the fundamental characteristics of the regularization. </div>
105+
+ The parameter $\gamma$ is only relevant for non-convex penalties. The Lasso
106+
penalty can be viewed as a special case in which $\gamma$ is not required. </div>
106107

107108

108109
## Penalties
@@ -112,14 +113,14 @@ where:
112113
[@tibshirani1996regression; @friedman2008sparse]
113114

114115

115-
$$\lambda p(\omega_{ij}) = \lambda\vert\omega_{ij}\vert.$$
116+
$$P_\lambda(\omega_{ij}) = \lambda\vert\omega_{ij}\vert.$$
116117

117118

118119
2. Adaptive lasso [@zou2006adaptive; @fan2009network]
119120

120121

121122
$$
122-
\lambda p_\gamma(\omega_{ij}) = \lambda\frac{\vert\omega_{ij}\vert}{v_{ij}},
123+
P_{\lambda,\gamma}(\omega_{ij}) = \lambda\frac{\vert\omega_{ij}\vert}{v_{ij}},
123124
$$
124125
where $V = (v_{ij})_{d \times d} = (\vert\tilde{\omega}_{ij}\vert^\gamma)_{d \times d}$
125126
is a matrix of adaptive weights, and $\tilde{\omega}_{ij}$ is the initial estimate
@@ -130,7 +131,7 @@ obtained using `penalty = "lasso"`.
130131

131132

132133
$$
133-
\lambda p_\gamma(\omega_{ij})
134+
P_{\lambda,\gamma}(\omega_{ij})
134135
= \lambda(\gamma+\frac{2}{\pi})
135136
\arctan\left(\frac{\vert\omega_{ij}\vert}{\gamma}\right),
136137
\quad \gamma > 0.
@@ -141,7 +142,7 @@ $$
141142

142143

143144
$$
144-
\lambda p_\gamma(\omega_{ij})
145+
P_{\lambda,\gamma}(\omega_{ij})
145146
= \lambda\left[1-\exp\left(-\frac{\vert\omega_{ij}\vert}{\gamma}\right)\right],
146147
\quad \gamma > 0.
147148
$$
@@ -151,7 +152,7 @@ $$
151152

152153

153154
$$
154-
\lambda p_\gamma(\omega_{ij}) = \lambda\vert\omega_{ij}\vert^\gamma,
155+
P_{\lambda,\gamma}(\omega_{ij}) = \lambda\vert\omega_{ij}\vert^\gamma,
155156
\quad 0 < \gamma < 1.
156157
$$
157158

@@ -160,7 +161,7 @@ $$
160161

161162

162163
$$
163-
\lambda p_\gamma(\omega_{ij})
164+
P_{\lambda,\gamma}(\omega_{ij})
164165
= \lambda\log\left(1+\frac{\vert\omega_{ij}\vert}{\gamma}\right),
165166
\quad \gamma > 0.
166167
$$
@@ -170,7 +171,7 @@ $$
170171

171172

172173
$$
173-
\lambda p_\gamma(\omega_{ij})
174+
P_{\lambda,\gamma}(\omega_{ij})
174175
= \begin{cases}
175176
\lambda\vert\omega_{ij}\vert - \dfrac{\omega_{ij}^2}{2\gamma},
176177
& \text{if } \vert\omega_{ij}\vert \leq \gamma\lambda, \\
@@ -185,7 +186,7 @@ $$
185186

186187

187188
$$
188-
\lambda p_\gamma(\omega_{ij})
189+
P_{\lambda,\gamma}(\omega_{ij})
189190
= \begin{cases}
190191
\lambda\vert\omega_{ij}\vert
191192
& \text{if } \vert\omega_{ij}\vert \leq \lambda, \\
@@ -202,12 +203,8 @@ $$
202203
**Note**:
203204

204205
+ For Lasso, which is convex, the additional parameter $\gamma$ is not required,
205-
and the penalty kernel $p_\gamma(\cdot)$ simplifies to $p(\cdot)$.
206-
207-
208-
+ For MCP and SCAD, $\lambda$ plays a dual role: it is the global regularization
209-
parameter, but it is also implicitly contained within the kernel
210-
$p_\gamma(\cdot)$. </div>
206+
and the penalty function $P_{\lambda,\gamma}(\cdot)$ simplifies to
207+
$P_\lambda(\cdot)$. </div>
211208

212209

213210
## Illustrative Visualization

0 commit comments

Comments
 (0)