| sssp_solve | R Documentation |
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.
sssp_solve(A, b, groups, r, s, gamma = NULL, max_iter = 200L,
tol = 1e-06, x0 = NULL, verbose = FALSE)
A |
Numeric matrix. |
b |
Numeric response vector. |
groups |
Group sizes or a list of 1-based index vectors encoding
|
r |
Group sparsity level |
s |
Sparsity level |
gamma |
Step length |
max_iter |
Maximum iterations. |
tol |
Relative step stopping tolerance. |
x0 |
Optional initial vector. |
verbose |
If |
A list with x and info.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.