Description Usage Arguments Value Author(s) References See Also Examples
View source: R/path.sparsestep.R
Fits the entire regularization path for SparseStep using a Golden Section search. Note that this algorithm is approximate, there is no guarantee that the solutions _between_ induced values of lambdas do not differ from those calculated. For instance, if solutions are calculated at λ[i] and λ[i+1], this algorithm ensures that λ[i+1] has one more zero than the solution at λ[i] (provided the recursion depth is large enough). There is however no guarantee that there are no different solutions between λ[i] and λ[i+1]. This is an ongoing research topic.
Note that this path algorithm is not faster than running the 
sparsestep function with the same λ sequence.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  | 
x | 
 matrix of predictors  | 
y | 
 response  | 
max.depth | 
 maximum recursion depth  | 
gamma0 | 
 starting value of the gamma parameter  | 
gammastop | 
 stopping value of the gamma parameter  | 
IMsteps | 
 number of steps of the majorization algorithm to perform for each value of gamma  | 
gammastep | 
 factor to decrease gamma with at each step  | 
normalize | 
 if TRUE, each variable is standardized to have unit L2 norm, otherwise it is left alone.  | 
intercept | 
 if TRUE, an intercept is included in the model (and not penalized), otherwise no intercept is included  | 
force.zero | 
 if TRUE, absolute coefficients smaller than the provided threshold value are set to absolute zero as a post-processing step, otherwise no thresholding is performed  | 
threshold | 
 threshold value to use for setting coefficients to absolute zero  | 
XX | 
 The X'X matrix; useful for repeated runs where X'X stays the same  | 
Xy | 
 The X'y matrix; useful for repeated runs where X'y stays the same  | 
use.XX | 
 whether or not to compute X'X and return it  | 
use.Xy | 
 whether or not to compute X'y and return it  | 
quiet | 
 don't print search info while running  | 
A "sparsestep" S3 object is returned, for which print, predict, coef, and plot methods exist. It has the following items:
call | 
 The call that was used to construct the model.  | 
lambda | 
 The value(s) of lambda used to construct the model.  | 
gamma0 | 
 The gamma0 value of the model.  | 
gammastop | 
 The gammastop value of the model  | 
IMsteps | 
 The IMsteps value of the model  | 
gammastep | 
 The gammastep value of the model  | 
intercept | 
 Boolean indicating if an intercept was fitted in the model  | 
force.zero | 
 Boolean indicating if a force zero-setting was performed.  | 
threshold | 
 The threshold used for a forced zero-setting  | 
beta | 
 The resulting coefficients stored in a sparse matrix format (dgCMatrix). This matrix has dimensions nvar x nlambda  | 
a0 | 
 The intercept vector for each value of gamma of length nlambda  | 
normx | 
 Vector used to normalize the columns of x  | 
meanx | 
 Vector of column means of x  | 
XX | 
 The matrix X'X if use.XX was set to TRUE  | 
Xy | 
 The matrix X'y if use.Xy was set to TRUE  | 
Gerrit J.J. van den Burg, Patrick J.F. Groenen, Andreas Alfons
Maintainer: Gerrit J.J. van den Burg <gertjanvandenburg@gmail.com>
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.
coef, print, predict, 
plot, and sparsestep.
1 2 3  | x <- matrix(rnorm(100*20), 100, 20)
y <- rnorm(100)
pth <- path.sparsestep(x, y)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.