L1-regularized quadratic function of multiple variables: Difference between revisions

From Calculus
Line 25: Line 25:
The partial derivative with respect to the variable <math>x_i</math>, and therefore also the <math>i^{th}</math> coordinate of the [[gradient vector]] (if it exists), is given as follows when <math>x_i \ne 0</math>:
The partial derivative with respect to the variable <math>x_i</math>, and therefore also the <math>i^{th}</math> coordinate of the [[gradient vector]] (if it exists), is given as follows when <math>x_i \ne 0</math>:


<math>\frac{\partial f}{\partial x_i} = \left(\sum_{j=1}^n a_{ij}x_j\right) + b_i + \lambda \operatorname{sgn}(x_i)</math>  
<math>\frac{\partial f}{\partial x_i} = \left(\sum_{j=1}^n (a_{ij} + a_{ji})x_j\right) + b_i + \lambda \operatorname{sgn}(x_i)</math>  


The partial derivative is undefined when <math>x_i = 0</math>.
The partial derivative is undefined when <math>x_i = 0</math>.

Revision as of 19:22, 11 May 2014

Definition

A L1-regularized quadratic function of the variables x1,x2,,xn is a function of the form:

f(x1,x2,,xn):=(i=1nj=1naijxixj)+(i=1nbixi)+λi=1n|xi|+c

In vector form, if we denote by x the column vector with coordinates x1,x2,,xn, then we can write the function as:

xTAx+bTx+λ|x|1+c

where A is the n×n matrix with entries aij and b is the column vector with entries bi.

Key data

Item Value
default domain the whole of Rn

Differentiation

Partial derivatives and gradient vector

The partial derivative with respect to the variable xi, and therefore also the ith coordinate of the gradient vector (if it exists), is given as follows when xi0:

fxi=(j=1n(aij+aji)xj)+bi+λsgn(xi)

The partial derivative is undefined when xi=0.

The gradient vector exists if and only if all the coordinates are nonzero.

In vector notation, the gradient vector is as follows for all x with all coordinates nonzero:

f(x)=Ax+b+λsgn¯(x)

where sgn¯ is the signum vector function.