gelnet(X, y, l1, l2, nFeats = NULL, a = rep(1, n), d = rep(1, p),
P = diag(p), m = rep(0, p), max.iter = 100, eps = 1e-05,
w.init = rep(0, p), b.init = NULL, fix.bias = FALSE, silent = FALSE,
balanced = FALSE, nonneg = FALSE)
If y is a factor with two levels, then the function returns a binary classification model, obtained by optimizing the following objective function: $$-\frac{1}{n} \sum_i y_i s_i - \log( 1 + \exp(s_i) ) + R(w)$$ where $$s_i = w^T x_i + b$$
Finally, if no labels are provided (y == NULL), then a one-class model is constructed using the following objective function: $$-\frac{1}{n} \sum_i s_i - \log( 1 + \exp(s_i) ) + R(w)$$ where $$s_i = w^T x_i$$
In all cases, the regularizer is defined by $$R(w) = \lambda_1 \sum_j d_j |w_j| + \frac{\lambda_2}{2} (w-m)^T P (w-m)$$
The training itself is performed through cyclical coordinate descent, and the optimization is terminated after the desired tolerance is achieved or after a maximum number of iterations.
gelnet.lin.obj
, gelnet.logreg.obj
, gelnet.oneclass.obj