The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Package {sssp}


Title: Semi-Symmetric Sparse Projection
Version: 0.1.0
Description: Computes the exact joint sparsity and group sparsity projection using the Semi-symmetric Sparse Projection algorithm of J. Shen and S. Damadi, "Sparse projection onto semi-symmetric sets with applications to sparse optimization", Journal of Global Optimization (2026), <doi:10.1007/s10898-026-01592-y>.
License: MIT + file LICENSE
Encoding: UTF-8
VignetteBuilder: knitr
Suggests: knitr, rmarkdown
NeedsCompilation: yes
Packaged: 2026-08-24 21:35:34 UTC; saeed
Author: Saeed Damadi [aut, cre]
Maintainer: Saeed Damadi <sparsification@gmail.com>
Repository: CRAN
Date/Publication: 2026-09-05 14:10:02 UTC

Citation for the SSSP algorithm

Description

Returns the citation line for the SSSP algorithm and the Journal of Global Optimization paper.

Usage

sssp_citation()

Value

A character scalar.

Examples

sssp_citation()

Exact joint sparsity and group sparsity projection

Description

Computes an exact element of P_{G_r \cap C_s}(v). The argument groups must form a disjoint union of all indices of v; R index vectors are 1-based. A numeric vector groups is interpreted as (|\mathcal{L}_1|,\ldots,|\mathcal{L}_p|) for contiguous groups.

Usage

sssp_project(v, groups, r, s, verbose = FALSE)

Arguments

v

Numeric vector v \in \mathbb{R}^n.

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.

verbose

If TRUE, print a citation-bearing result.

Value

A list with x, the projection, and info, including objective, tuple, selected_groups, n_tuples, and wall_time.

Examples

v <- c(10, -1, 2, 3, 9, 0, -4, -8, 7, 6)
res <- sssp_project(v, c(3, 4, 3), r = 3, s = 6)
res$x
res$info$tuple

## non-uniform groups given as index lists
v2 <- c(4, -3, 5, 2, -6, 1, 7, -8, 0.5, 9, -2, 3)
groups2 <- list(c(1, 4), c(2, 3, 5, 8, 9, 10), c(6, 7, 11, 12))
sssp_project(v2, groups2, r = 2, s = 5)$info$tuple

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

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.