Learn R Programming

sglOptim (version 1.0.122.0)

prepare.args: Generic function for preparing the sgl call arguments

Description

Compute and prepare the sgl call arguments for the objective function $$\mathrm{loss}(\mathrm{data})(\beta) + \lambda \left( (1-\alpha) \sum_{J=1}^m \gamma_J \|\beta^{(J)}\|_2 + \alpha \sum_{i=1}^{n} \xi_i |\beta_i| \right)$$ where $\mathrm{loss}$ is a loss/objective function. The $n$ parameters are organized in the parameter matrix $\beta$ with dimension $q\times p$. The vector $\beta^{(J)}$ denotes the $J$ parameter group, the dimension of $\beta^{(J)}$ is denote by $d_J$. The dimensions $d_J$ must be multiple of $q$, and $\beta = (\beta^{(1)} \cdots \beta^{(m)})$. The group weights $\gamma \in [0,\infty)^m$ and the parameter weights $\xi \in [0,\infty)^{qp}$.

Usage

prepare.args(data, ...)

Arguments

data
a data object
...
additional parameters

Value

  • block.dima vector of length $m$, containing the dimensions $d_J$ of the groups (i.e. the number of parameters in the groups)
  • groupWeightsa vector of length $m$, containing the group weights
  • parameterWeightsa matrix of dimension $q \times p$, containing the parameter weights
  • alphathe $\alpha$ value
  • datathe data parsed to the loss module
  • group.orderoriginal order of the columns of $\beta$. Before sgl routines return $\beta$ will be reorganized according to this order.

See Also

prepare.args.sgldata

Other sgldata: create.sgldata, prepare.args.sgldata, rearrange.sgldata