Description Usage Arguments Value Examples
View source: R/FunctionsALasso.R
Perform cross-validation to select the best fit and finds the optimal lambda for a particular gamma value
1 2 3 4 5 6 7 8 9 10 |
X |
n x p design matrix of inputs |
Y |
n x 1 vector of outputs |
tuning_seq |
(optional)sequence of tuning parameters |
len_tuning |
length of desired tuning parameter sequence |
gamma |
a scalar(>0) input used in the weight(user input) |
k |
number of folds for k-fold cross-validation, default is 5 |
id_fold |
(optional) vector of length n specifying the folds assignment (from 1 to max(folds_ids)), if supplied the value of k is ignored |
eps |
precision level for convergence assessment, default 0.001 |
tuning_seq |
the actual sequence of tuning parameters used |
beta_lamb |
p x length(tuning_seq) matrix of corresponding solutions at each lambda value (original data without center or scale) |
intercept_vec |
Unscaled vector of intercepts for a fixed gamma and for different lambda values |
id_fold |
used splitting into folds from 1 to k (either as supplied or as generated in the beginning) |
lambda_min |
selected lambda based on minimal rule |
cv |
values of CV(lambda) for each lambda |
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.