Computes the Q matrix for order 1 Tikhonov regularization




This function computes the Q matrix for order 1 Tikhonov regularization. The Q matrix is used to regularize the Least Squares optimization

$$ \min_w || A w \textrm{--} b ||^2 $$

where w represents the array of the weights of the alpha basis in the definition of pwas function.

The regularized problems becomes

$$ \min_w || G w \textrm{--} d ||^2 + || \lambda L w ||^2 \qquad (1) $$

L is built in such a way to minimize the gradient of the pwas function defined by weights w. The structure of L is explained with this simple 2 dimensional example: consider this simplicial partition

in which the weights are associated to the vertices as shown in the table below:

|   w1  |   w2  |   w3  |   w4  |   w5  |   w6  |   w7  |   w8  |   w9  |

The matrix L is such as the term $L w$ has this structure:


which corresponds to the gradient of the pwas function computed in the vertices of the simplicial partition.

The Q matrix returned by this function is just the product $Q = L'L$.


Q = QMatrix(D,P)

D is a matrix specifying the domain in the form: $$\left[ \begin{array}{cccc} x_{min}^1 & x_{min}^2 & \ldots & x_{min}^{nx}\\ x_{max}^1 & x_{max}^2 & \ldots & x_{max}^{nx} \end{array} \right] $$

P can be an array containing the number of subdivisions per dimensions (in case of uniform partition) or a cell array whose i-th element contains the i-th component of the vertices of the simplicial partition (for non-uniform partition).



Copyright is with: