xref: /petsc/src/tao/leastsquares/impls/brgn/brgn.h (revision 6e9726d0ebfba0eb974da3d46c81421b975bf431)
1 /*
2 Context for Bounded Regularized Gauss-Newton algorithm.
3 Extended with L1-regularizer with a linear transformation matrix D:
4 0.5*||Ax-b||^2 + lambda*||D*x||_1
5 When D is an identity matrix, we have the classic lasso, aka basis pursuit denoising in compressive sensing problem.
6 */
7 
8 #if !defined(__TAO_BRGN_H)
9 #define __TAO_BRGN_H
10 
11 #include <../src/tao/bound/impls/bnk/bnk.h>
12 
13 typedef struct {
14   Mat J, H, D;  /* Jacobian, Hessian, and Dictionary matrix have size M*N, N*N, and P*N respectively. */
15   Vec x_old, x_work, r_work, diag, y, y_work;  /* x, r=J*x, and y=D*x have size N, M, and P respectively. */
16   Tao subsolver, parent;
17   PetscReal lambda, epsilon; /* lambda is regularizer weight for both L2-norm Gaussian-Newton and L1-norm, ||x||_1 is approximated with sum(sqrt(x.^2+epsilon^2)-epsilon)*/
18 } TAO_BRGN;
19 
20 #endif /* if !defined(__TAO_BRGN_H) */
21