| gelnet.lin.obj | R Documentation |
Evaluates the linear regression objective function value for a given model. See details.
gelnet.lin.obj(
w,
b,
X,
z,
l1,
l2,
a = rep(1, nrow(X)),
d = rep(1, ncol(X)),
P = diag(ncol(X)),
m = rep(0, ncol(X))
)
w |
p-by-1 vector of model weights |
b |
the model bias term |
X |
n-by-p matrix of n samples in p dimensions |
z |
n-by-1 response vector |
l1 |
L1-norm penalty scaling factor |
l2 |
L2-norm penalty scaling factor |
a |
n-by-1 vector of sample weights |
d |
p-by-1 vector of feature weights |
P |
p-by-p feature-feature penalty matrix |
m |
p-by-1 vector of translation coefficients |
Computes the objective function value according to
\frac{1}{2n} \sum_i a_i (z_i - (w^T x_i + b))^2 + R(w)
where
R(w) = \lambda_1 \sum_j d_j |w_j| + \frac{\lambda_2}{2} (w-m)^T P (w-m)
The objective function value.
gelnet
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.