sssp_solve: Projected gradient descent with the SSSP projection

View source: R/sssp.R

sssp_solveR Documentation

Projected gradient descent with the SSSP projection

Description

Applies x^{k+1} \in P_{G_r \cap C_s}(x^k - \gamma \nabla f(x^k)) to f(x)=\frac{1}{2}\|Ax-b\|_2^2.

Usage

sssp_solve(A, b, groups, r, s, gamma = NULL, max_iter = 200L,
  tol = 1e-06, x0 = NULL, verbose = FALSE)

Arguments

A

Numeric matrix.

b

Numeric response vector.

groups

Group sizes or a list of 1-based index vectors encoding \mathcal{L}_1,\ldots,\mathcal{L}_p.

r

Group sparsity level r.

s

Sparsity level s.

gamma

Step length \gamma; if NULL, use 1/\|A\|_2^2.

max_iter

Maximum iterations.

tol

Relative step stopping tolerance.

x0

Optional initial vector.

verbose

If TRUE, print a citation-bearing result.

Value

A list with x and info.

Examples

set.seed(1)
A <- matrix(rnorm(40 * 12), 40, 12)
x_true <- c(1, 2, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0)
b <- as.vector(A %*% x_true)
res <- sssp_solve(A, b, groups = c(4, 4, 4), r = 2, s = 4)
res$x

sssp documentation built on Sept. 5, 2026, 5:08 p.m.