aboutsummaryrefslogtreecommitdiff
path: root/man/sparsestep.Rd
blob: 3d4a31120d336096d4065d5acab4d2f7a67cce9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/fit.sparsestep.R, R/sparsestep.R
\docType{package}
\name{sparsestep}
\alias{sparsestep}
\alias{sparsestep-package}
\title{Fits the SparseStep model}
\usage{
sparsestep(x, y, lambda = 1, gamma0 = 1e+06, gammastop = 1e-08,
  IMsteps = 2, gammastep = 2, normalize = TRUE, intercept = TRUE,
  force.zero = TRUE, threshold = 1e-07, XX = NULL, Xy = NULL,
  use.XX = TRUE, use.Xy = TRUE)
}
\arguments{
\item{x}{matrix of predictors}

\item{y}{response}

\item{lambda}{regularization parameter}

\item{gamma0}{starting value of the gamma parameter}

\item{gammastop}{stopping value of the gamma parameter}

\item{IMsteps}{number of steps of the majorization algorithm to perform for
each value of gamma}

\item{gammastep}{factor to decrease gamma with at each step}

\item{normalize}{if TRUE, each variable is standardized to have unit L2
norm, otherwise it is left alone.}

\item{intercept}{if TRUE, an intercept is included in the model (and not
penalized), otherwise no intercept is included}

\item{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}

\item{threshold}{threshold value to use for setting coefficients to
absolute zero}

\item{XX}{The X'X matrix; useful for repeated runs where X'X stays the same}

\item{Xy}{The X'y matrix; useful for repeated runs where X'y stays the same}

\item{use.XX}{whether or not to compute X'X and return it}

\item{use.Xy}{whether or not to compute X'y and return it}
}
\value{
A "sparsestep" object is returned, for which predict, coef, methods
exist.
}
\description{
Fits the SparseStep model for a single value of the
regularization parameter.

sparsestep.
}
\examples{
data(diabetes)
attach(diabetes)
object <- sparsestep(x, y)
plot(object)
detach(diabetes)
}