Description Usage Arguments Value Examples
Fit and Cross-Validate a Linear Model with a Combination of Lasso and Group Lasso Regularization
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
data |
data should be a list of $x$ and $y$, x is a data matrix (n x p) and y is a vector |
index |
A p-vector indicating group membership of each covariate |
nfold |
Number of folds of the cross-validation loop |
nlam |
Number of lambda to use in the regularization path |
min.frac |
The minimum value of the penalty parameter, as a fraction of the maximum value |
alpha |
The mixing parameter. |
lambdas |
A user inputted sequence of lambda values for fitting. We recommend leaving this NULL and letting FSGL self-select values |
thresh |
Convergence threshold for change in beta |
maxit |
Maximum number of iterations to convergence |
gamma |
Fitting parameter used for tuning backtracking (between 0 and 1) |
verbose |
Logical flag for whether or not step number will be output |
step |
Fitting parameter used for inital backtracking step size (between 0 and 1) |
reset |
Fitting parameter used for taking advantage of local strong convexity in nesterov momentum (number of iterations before momentum term is reset) |
foldid |
An optional user-pecified vector indicating the cross-validation fold in which each observation should be included. Values in this vector should range from 1 to nfold. If left unspecified, SGL will randomly assign observations to folds |
UseUpperBound |
A logical flag for using upper bound |
An object with S3 class "cv.FSGL"
An nlam
vector of cross validated negative log likelihoods (squared error loss in the linear case, along the regularization path)
An nlame
vector of approximate standard deviations of lldiff
The actual list of lambda
values used in the regularization path.
A model fit object created by a call to FSGL
on the entire dataset
A vector indicating the cross-validation folds that each observation is assigned to
A matrix of prevalidated predictions for each observation, for each lambda-value
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.