Description Usage Arguments Details Value References See Also Examples
Fit a alph-norm model with proximal algorithm and coordinate descent
1 2 |
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 |
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
An object of S3 class "alphanorm"
|
input design matrix |
|
input of response vector |
|
input of lambda in the decreasing order |
|
input value of q |
|
matrix coefficients |
|
non-penalized intercept(if intercept=TRUE), otherwise, NULL |
|
number of nonzero coefficients for each value of lambda |
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.
predict.alphanorm
, coef.alphanorm
, cv.alphanorm
, and plot.alphanorm
methods
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.