Description Usage Arguments Details Value Author(s) Examples
Penalty objects provide a convenient way to specify the details of the penalty terms used by functions for penalized regression
problems as in lqa
. See the documentation for lqa
for the details on how such model fitting takes place.
1 | penalty (x, ...)
|
x |
the function |
... |
further arguments passed to methods. |
penalty
is a generic function with methods for objects of the lqa
class.
The most crucial issue of penalty
objects
is to compute
\mathbf{A}_λ = ∑_{j=1}^J \frac{p_{λ,j}'(|\mathbf{a}_j^\top \boldsymbol{β}|)}{√{(\mathbf{a}_j^\top \boldsymbol{β})^2 + c}} \mathbf{a}_j\mathbf{a}_j^\top,
where c > 0 is a small real number. This approximated penalty matrix will be used in the fitting procedures lqa.update2
, GBlockBoost
or ForwardBoost
.
There are five basic methods for penalty
objects: penalty
, lambda
, getpenmat
, first.derivative
, a.coefs
.
The methods penalty
and lambda
are mandatory. They
are necessary to identify the penalty family and, respectively, the tuning parameter vector in the other functions of
the lqa-package
. But they just appear as list elements in the structure()
environment. The function
getpenmat()
and the functions first.derivative()
and a.coefs()
are mutually exclusive. Whether we need the first one or the last two depends on
the nature of the penalty. Hence we have to distinguish two
cases
(i)The use of a function getpenmat()
is more efficient (in a numerical sense) if
\bulletthe penalty matrix \mathbf{A}_λ as given above is a diagonal matrix, e.g. if J = p and \mathbf{a}_j, \:j=1,…,J just contains one non-zero element, or
\bulletthe penalty is quadratic.
Then the (approximate) penalty matrix \mathbf{A}_λ can be computed directly. Most implemented penalties are of those
types, e.g. ridge
, lasso
, scad
and penalreg
.
(ii)The combination of the functions first.derivative
and a.coefs
is necessary in all other cases. The
fused.lasso
penalty
is an example for it.
An object of the class penalty
(which has a concise print method). This is a list with elements
penalty |
character: the penalty name. |
lambda |
double: the (non-negative) tuning parameter. |
getpenmat |
function: the penalty matrix. Note this element is optional. Either |
first.derivative |
function: This returns a J dimensional vector of the first derivative of the J penalty terms with respect to ξ_j not(!!!) to \mathbf{β}. |
a.coefs |
a p \times J matrix containing the coefficients of the linear combinations. |
Jan Ulbricht
1 2 3 4 |
Penalty = lasso (lambda = 1.5)
lambda lambda lambda lambda
1.5 1.5 1.5 1.5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.