LARSModel {MachineShop} | R Documentation |
Least Angle Regression, Lasso and Infinitesimal Forward Stagewise Models
Description
Fit variants of Lasso, and provide the entire sequence of coefficients and fits, starting from zero to the least squares fit.
Usage
LARSModel(
type = c("lasso", "lar", "forward.stagewise", "stepwise"),
trace = FALSE,
normalize = TRUE,
intercept = TRUE,
step = numeric(),
use.Gram = TRUE
)
Arguments
type |
model type. |
trace |
logical indicating whether status information is printed during the fitting process. |
normalize |
whether to standardize each variable to have unit L2 norm. |
intercept |
whether to include an intercept in the model. |
step |
algorithm step number to use for prediction. May be a decimal
number indicating a fractional distance between steps. If specified, the
maximum number of algorithm steps will be |
use.Gram |
whether to precompute the Gram matrix. |
Details
- Response types:
numeric
- Automatic tuning of grid parameter:
-
step
Default argument values and further model details can be found in the source See Also link below.
Value
MLModel
class object.
See Also
Examples
## Requires prior installation of suggested package lars to run
fit(sale_amount ~ ., data = ICHomes, model = LARSModel)