alphanorm: fit a sparse model with alpha-norm regularization

Description Usage Arguments Details Value References See Also Examples

View source: R/alphanorm.R

Description

Fit a alph-norm model with proximal algorithm and coordinate descent

Usage

1
2
alphanorm(x, y, lambda = exp(10:-10), q = 0.5, intercept = TRUE,
  tol = 1e-07, T = 500, nlambda = NULL, trace = FALSE)

Arguments

x

the design matrix

y

the response vector

lambda

a vector of lambda values, default as exp(10:-10)

q

a numerical value for q, 0<q<=1, with default 0.5

intercept

whether the intercept term should be included, TRUE to be included(default), FALSE not to

tol

tolerence of convergence condition

T

number of maximum iterations for each coefficient

nlambda

number of lambda wanted

trace

print the process

Details

The sequence of models implied by lambda is solved via coordinate descent. The objective function is:

J(β)=1/2 \mbox{RSS}+λ*\mbox{penalty}

Here the penalty is the l_q norm of coefficients, which is ∑(|β_i|^q), 0<q<=1, when q=1, it is actually same as lasso

Value

An object of S3 class "alphanorm"

x

input design matrix

y

input of response vector

Lambda

input of lambda in the decreasing order

q

input value of q

Coefficient

matrix coefficients

Intercept

non-penalized intercept(if intercept=TRUE), otherwise, NULL

df

number of nonzero coefficients for each value of lambda

References

Feng, Guanhao and Polson, Nicholas G and Wang, Yuexi and Xu, Jianeng, Sparse Regularization in Marketing and Economics (August 20, 2017). Available at SSRN: https://ssrn.com/abstract=3022856

Marjanovic, G. and V. Solo (2014). lq sparsity penalized linear regression with cyclic descent. IEEE Transactions on Signal Processing 62(6), 1464<e2><80><93>1475.

See Also

predict.alphanorm, coef.alphanorm, cv.alphanorm, and plot.alphanorm methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
x<-matrix(rnorm(100*100),100,100)
# Only the first 10 are true predictors
y<-x[,1:10]%*%rep(1,10)

# Build a alpha-norm model
alphanorm.obj<-alphanorm(x,y,intercept=FALSE)
# Get coefficients
coef(alphanorm.obj)
# Get fitted values
predict(alphanorm.obj)
# Cross-validation to choose q and lambda
cv.alphanorm(x,y,intercept=FALSE)
# Plot coefficient profile according to log-lambda
plot(alphanorm.obj)

yxwang99/alphanorm documentation built on May 23, 2019, 11:34 p.m.