Title: | Group Sparse Optimization |
---|---|
Description: | Approaches a group sparse solution of an underdetermined linear system. It implements the proximal gradient algorithm to solve a lower regularization model of group sparse learning. For details, please refer to the paper "Y. Hu, C. Li, K. Meng, J. Qin and X. Yang. Group sparse optimization via l_{p,q} regularization. Journal of Machine Learning Research, to appear, 2017". |
Authors: | Yaohua Hu [aut, cre, cph], Xinlin Hu [trl] |
Maintainer: | Yaohua Hu <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0 |
Built: | 2025-02-23 03:31:07 UTC |
Source: | https://github.com/cran/GSparO |
demon is a function that implements GSparO for an example of least squares regression with A and b being Gaussian ensembles. A figure plotting the true signal and estimation by GSparO is illustrated in Plots, and the errors of least squares regression and obtained solution are printed. Two packages ThreeWay and ggplot2 should be installed for implementing demon.
demon()
demon()
Copyright by Dr. Yaohua Hu, College of Mathematics and Statistics, Shenzhen University. Email: [email protected]
demon()
demon()
Group sparse optimization (GSparO) for least squares regression by using the proximal gradient algorithm to solve the L_2,1/2 regularization model.
GSparO(A, b, Initial, group, MaxIter, sparsity)
GSparO(A, b, Initial, group, MaxIter, sparsity)
A |
decoding matrix (matrix of predictors) |
b |
noised signal (response) |
Initial |
an initial point of iteration, recommend to set as a column vector of zeros |
group |
group information, a column vector consisting of the length of each group |
MaxIter |
the maximum number of iterations (a stopping criterion), recommend to set as 200 |
sparsity |
a guess of the group sparsity level (the number of nonzero groups) |
GSparO is group sparse optimization for least squares regression described in [Hu et al(2017)], in which the proximal gradient algorithm is implemented to solve the L_2,1/2 regularization model. GSparO is an iterative algorithm consisting of a gradient step for the least squares regression and a proximal steps for the L_2,1/2 penalty, which is analytically formulated in this function. Also, GSparO can solve sparse variable selection problem in absence of group structure. In particular, setting group in GSparO be a vector of ones, GSparO is reduced to the iterative half thresholding algorithm introduced in [Xu et al (2012)]. Copyright by Dr. Yaohua Hu, College of Mathematics and Statistics, Shenzhen University. Email: [email protected]
Yaohua Hu
Y. Hu, C. Li, K. Meng, J. Qin, and X. Yang (2017). Group sparse optimization via L_p,q regularization. Journal of Machine Learning Research, to appear.
Z. Xu, X. Chang, F. Xu, and H. Zhang (2012). L_1/2 regularization: A thresholding representation theory and a fast solver. IEEE Transactions on Neural Networks and Learning Systems.
m <- 256 n <- 1024 sparsity <- 6 gLen <- 16 MaxIter <- 200 gNo <- 1024/gLen group <- gLen*matrix(1,gNo,1) A <- matrix(rnorm(m*n,0,1),m,n) library(ThreeWay) A <- orth(t(A)) A <- t(A) gNo1 <- 1:gNo ActInd <- sample(gNo1,gNo) Bs <- matrix(0,n,1) c <- matrix(rnorm(n,0,1),n,1) for (i in 1:sparsity){ Bs[((ActInd[i]-1)*gLen+1):(ActInd[i]*gLen)] <- matrix(1,gLen,1)} c <- Bs*c sigma <- 1e-3 b <- A%*%c + sigma*matrix(runif(m,min=0,max=1),m,1) Initial <- matrix(0,n,1) GSparO(A,b,Initial,group,MaxIter,sparsity)
m <- 256 n <- 1024 sparsity <- 6 gLen <- 16 MaxIter <- 200 gNo <- 1024/gLen group <- gLen*matrix(1,gNo,1) A <- matrix(rnorm(m*n,0,1),m,n) library(ThreeWay) A <- orth(t(A)) A <- t(A) gNo1 <- 1:gNo ActInd <- sample(gNo1,gNo) Bs <- matrix(0,n,1) c <- matrix(rnorm(n,0,1),n,1) for (i in 1:sparsity){ Bs[((ActInd[i]-1)*gLen+1):(ActInd[i]*gLen)] <- matrix(1,gLen,1)} c <- Bs*c sigma <- 1e-3 b <- A%*%c + sigma*matrix(runif(m,min=0,max=1),m,1) Initial <- matrix(0,n,1) GSparO(A,b,Initial,group,MaxIter,sparsity)