smoothcholCV: Performs kfolds-cross validation

Description Usage Arguments Value See Also Examples

View source: R/smoothcholCV.R

Description

Selects tuning parameters by cross validation according to the likelihood on testing data.

Usage

1
2
3
4
smoothcholCV(k = 5, X, both.lambda = FALSE, lambda1_seq = NULL,
  lambda2_seq = NULL, max_iter = 50, init.x = NULL, band = NULL,
  n_lambda = 60, pen.type = c("HP", "fused", "l1trend"),
  ABSTOL = 0.001, stand = TRUE)

Arguments

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.

Value

A list object containing

See Also

smoothchol

Examples

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")

adallak/SCPackage documentation built on Feb. 7, 2022, 1:58 a.m.