Description Usage Arguments Value See Also Examples
Selects tuning parameters by cross validation according to the likelihood on testing data.
1 2 3 4 |
k |
Folds used in cross-validation. The default is $k = 5$ |
X |
A n-by-p sample matrix, each row is an observation of th p-dim random vector. |
both.lambda |
Logical. If TRUE the cross-validation implemented for both lambdas. |
lambda1_seq |
A vector of non-negative tuning parameters for lambda1 to control sparsity. |
lambda2_seq |
A vector of non-negative tuning parameters for lambda1 to control smoothness |
max_iter |
Maximum number of iterations |
band |
Positive number of subdiagonal to be estimated. If not provided, the algorithm iterates over all subdiagonals. |
n_lambda |
If lambda1_seq and lambda2_seq is not provided, create a vector of lambdas with length n_lambda. Default is 60. |
pen.type |
Selects penalty for smoothness. |
ABSTOL |
The tolerence for convergence |
stand |
Logical, if TRUE the data will be standardized. |
A list object containing
lambda1_min: Selected value of lambda1 based on cross validation.
lambda2_min: Selected value of lambda1 based on cross validation.
L_fit: Estimate of L corresponding to the best fit.
lambda1_seq: lambda1 grid used in cross validation.
lambda2_seq: lambda2 grid used in cross validation.
1 2 3 4 5 6 7 | set.seed(11)
require(varband)
n = 100
p = 50
L_true = generateL(p = p, case = "c")$L
X = sample_gen(L = L_true, n = n)
L_cv = smoothcholCV(k = 5,X = X, both.lambda = FALSE, n_lambda = 30, pen.type = "fused")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.