Description Usage Arguments Value See Also Examples
The main cross-validation function to select the best sprinter fit for a path of tuning parameters.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
x |
An |
y |
A response vector of size |
square |
Indicator of whether squared effects should be fitted in Step 1. Default to be FALSE. |
num_keep |
A user specified number of candidate interactions to keep in Step 2. If |
lambda1 |
Tuning parameter values for Step 1. |
lambda3 |
Tuning parameter values for Step 3. |
cv_step1 |
Indicator of whether cross-validation of |
nlam1 |
the number of values in |
nlam3 |
the number of values in each column of |
lam_min_ratio |
The ratio of the smallest and the largest values in |
nfold |
Number of folds in cross-validation. Default value is 5. If each fold gets too view observation, a warning is thrown and the minimal |
foldid |
A vector of length |
verbose |
If |
... |
other arguments to be passed to the |
An object of S3 class "sprinter
".
n
The sample size.
p
The number of main effects.
square
The square
parameter passed into sprinter.
a0_step3
Estimate of intercept corresponding to the CV-selected model.
compact
A compact representation of the selected variables. compact
has three columns, with the first two columns representing the indices of a selected variable (main effects with first index = 0), and the last column representing the estimate of coefficients.
fit
The whole glmnet
fit object.
fitted
fitted value of response corresponding to the CV-selected model.
num_keep
The value of num_keep
.
cvm
The averaged estimated prediction error on the test sets over K folds.
cvse
The standard error of the estimated prediction error on the test sets over K folds.
foldid
Fold assignment. A vector of length n
.
i_lambda1_best
The index in lambda1
that is chosen by CV by minimizing cvm.
i_lambda3_best
The index in lambda3
that is chosen by CV by minimizing cvm.
lambda1_best
The value of lambda1
that is chosen by CV by minimizing cvm.
lambda3_best
The value of lambda3
that is chosen by CV by minimizing cvm.
call
Function call.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.