View source: R/function_crossValidation.R
DTD_cv_lambda_R | R Documentation |
Our descent generalized FISTA implementation includes a l1 regularization
term (see train_deconvolution_model
).
This function performs a 'n.folds'-fold cross validation to find the
best fitting regularization parameter.
DTD_cv_lambda_R( lambda.seq = "none", tweak.start, n.folds = 5, lambda.length = 10, train.data.list, cv.verbose = TRUE, warm.start = FALSE, F.GRAD.FUN, EVAL.FUN, ... )
lambda.seq |
numeric vector or NULL or "none": Over this series of lambdas the FISTA will be optimized. If 'lambda.seq' is set to NULL, a generic series of lambdas - depending on the dimensions of the training set - will be generated. If 'lambda.seq' is "none", no cross validation is done. Only one model with lambda = 0 is trained on the complete data set. |
tweak.start |
numeric vector, starting vector for the DTD algorithm. |
n.folds |
integer, number of buckets in the cross validation. |
lambda.length |
integer, how many lambdas will be generated (only used if lambda.seq is NULL) |
train.data.list |
list, with two entries, a numeric matrix each, named 'mixtures' and 'quantities' Within this list the train/test cross validation will be done. (see Vignette 'browseVignettes("DTD")' for details) |
cv.verbose |
logical, should information about the cv process be printed to the screen? |
warm.start |
logical, should the solution of a previous model of the cross validation be used as start in the next model. Notice, that the warm.start starts with the most unpenalized model. |
F.GRAD.FUN |
gradient function, see
|
EVAL.FUN |
evaluation function,
see |
... |
all parameters that are passed to the
|
For an example see 'browseVignettes("DTD")'.
Notice, there is an R and a C++ implementation of our optimizer.
Hence, there are two cross validation implementations,
calling either the R or C++ implementation:
DTD_cv_lambda_R
and DTD_cv_lambda_cxx
.
list of length 2:
'cv.obj', list of lists. DTD model for each lambda, and every folds.
'best.model', list. DTD model optimized on the complete data set with the best lambda from the cross validation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.