Internal function: This function computes the regularized models for all penaltiy functions which are implemented for glmnet and gist. Use the dedicated penalty functions (e.g., lessSEM::gpLasso) to penalize the model.
.gpOptimizationInternal(
par,
weights,
fn,
gr = NULL,
additionalArguments,
isCpp = FALSE,
penalty,
tuningParameters,
method,
control
)
Object of class gpRegularized
labeled vector with starting values
labeled vector with weights for each of the parameters in the model.
R function which takes the parameters AND their labels as input and returns the fit value (a single value)
R function which takes the parameters AND their labels as input and returns the gradients of the objective function. If set to NULL, numDeriv will be used to approximate the gradients
additional argument passed to fn and gr
boolean: are fn and gr C++ function pointers?
string: name of the penalty used in the model
data.frame with tuning parameter values
which optimizer should be used? Currently implemented are ista and glmnet. With ista, the control argument can be used to switch to related procedures (currently gist).
used to control the optimizer. This element is generated with the controlIsta() and controlGlmnet() functions.