dot-gpOptimizationInternal: .gpOptimizationInternal

.gpOptimizationInternalR Documentation

.gpOptimizationInternal

Description

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.

Usage

.gpOptimizationInternal(
  par,
  weights,
  fn,
  gr = NULL,
  additionalArguments,
  isCpp = FALSE,
  penalty,
  tuningParameters,
  method,
  control
)

Arguments

par

labeled vector with starting values

weights

labeled vector with weights for each of the parameters in the model.

fn

R function which takes the parameters AND their labels as input and returns the fit value (a single value)

gr

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

additionalArguments

additional argument passed to fn and gr

isCpp

boolean: are fn and gr C++ function pointers?

penalty

string: name of the penalty used in the model

tuningParameters

data.frame with tuning parameter values

method

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

control

used to control the optimizer. This element is generated with the controlIsta() and controlGlmnet() functions.

Value

Object of class gpRegularized


lessSEM documentation built on May 29, 2024, 7:10 a.m.