tunelambda | R Documentation |
Obtain the optimal sparsity parameter given a search grid based on cross validation score with replications.
tunelambda(data, time, ode.model, par.names, state.names, par.initial, basis.list,lambda_grid,cv_portion,kfolds, rep,controls)
data |
A data frame or matrix contrain observations from each dimension of the ODE model. |
time |
The vector contain observation times or a matrix if time points are different between dimensions. |
ode.model |
Defined R function that computes the time derivative of the ODE model given observations of states variable. |
par.names |
The names of structural parameters defined in the 'ode.model'. |
state.names |
The names of state variables defined in the 'ode.model'. |
par.initial |
Initial value of structural parameters to be optimized. |
basis.list |
A list of basis objects for smoothing each dimension's observations. Can be the same or different across dimensions. |
lambda_grid |
A search grid for finding the optimial sparsity parameter lambda. |
cv_portion |
A number indicating the proportion of data will be saved for doing cross validation. Default is set at 5 as minimum. |
kfolds |
A number indicating the number of folds the data should be seprated into. |
rep |
A integer controls the number of replication of doing cross-validation for each penalty parameter. |
controls |
A list of control parameters. See ‘Details’. |
lambda_grid |
The original input vector of a search grid for the optimal lambda. |
cv.score |
The matrix contains the cross validation score for each lambda of each replication |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.