Learn R Programming

sglOptim (version 1.3.8)

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_dim

a vector of length \(m\), containing the dimensions \(d_J\) of the groups (i.e. the number of parameters in the groups)

groupWeights

a vector of length \(m\), containing the group weights

parameterWeights

a matrix of dimension \(q \times p\), containing the parameter weights

alpha

the \(\alpha\) value

data

the data parsed to the loss module

group_order

original 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: add_data.sgldata, create.sgldata, prepare.args.sgldata, prepare_data, rearrange.sgldata, subsample.sgldata