Learn R Programming

sparsestep (version 1.0.1)

sparsestep-package: SparseStep: Approximating the Counting Norm for Sparse Regularization

Description

In the SparseStep regression model the ordinary least-squares problem is augmented with an approximation of the exact \(\ell_0\) pseudonorm. This approximation is made increasingly more accurate in the SparseStep algorithm, resulting in a sparse solution to the regression problem. See the references for more information.

Arguments

SparseStep functions

The main SparseStep functions are:

sparsestep

Fit a SparseStep model for a given range of \(\lambda\) values

path.sparsestep

Fit the SparseStep model along a path of \(\lambda\) values which are generated such that a model is created at each possible level of sparsity, or until a given recursion depth is reached.

Other available functions are:

plot

Plot the coefficient path of the SparseStep model.

predict

Predict the outcome of the linear model using SparseStep

coef

Get the coefficients from the SparseStep model

print

Print a short description of the SparseStep model

References

Van den Burg, G.J.J., Groenen, P.J.F. and Alfons, A. (2017). SparseStep: Approximating the Counting Norm for Sparse Regularization, arXiv preprint arXiv:1701.06967 [stat.ME]. URL https://arxiv.org/abs/1701.06967.

Examples

Run this code
# NOT RUN {
x <- matrix(rnorm(100*20), 100, 20)
y <- rnorm(100)
fit <- sparsestep(x, y)
plot(fit)
fits <- path.sparsestep(x, y)
plot(fits)
x2 <- matrix(rnorm(50*20), 50, 20)
y2 <- predict(fits, x2)

# }

Run the code above in your browser using DataLab