gelnet_lin_obj: Linear regression objective function

Description Usage Arguments Details Value

View source: R/RcppExports.R

Description

Evaluates the linear regression objective function value for a given model. See details.

Usage

1
2
gelnet_lin_obj(w, b, X, z, l1, l2, a = NULL, d = NULL, P = NULL,
  m = NULL)

Arguments

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 λ_1

l2

L2-norm penalty scaling factor λ_2

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

Details

Computes the objective function value according to

\frac{1}{2n} ∑_i a_i (z_i - (w^T x_i + b))^2 + R(w)

where

R(w) = λ_1 ∑_j d_j |w_j| + \frac{λ_2}{2} (w-m)^T P (w-m)

Value

The objective function value.


ArtemSokolov/gelnet documentation built on Sept. 13, 2019, 4:01 a.m.