Proximal GD

Proximal Gradient Descent.

Flexible encoding model, flexible sparsity model, and flexible reordering model. This is the one I would use out of all the ones I’ve coded up. Might be slower than the others as there’s a little more checking to do each iteration.

mr_utils.cs.convex.proximal_gd.proximal_GD(y, forward_fun, inverse_fun, sparsify, unsparsify, reorder_fun=None, mode='soft', alpha=0.5, alpha_start=0.5, thresh_sep=True, selective=None, x=None, ignore_residual=False, ignore_mse=True, ignore_ssim=True, disp=False, maxiter=200, strikes=0)[source]

Proximal gradient descent for generic encoding/sparsity model.

Parameters:
  • y (array_like) – Measured data (i.e., y = Ax).
  • forward_fun (callable) – A, the forward transformation function.
  • inverse_fun (callable) – A^H, the inverse transformation function.
  • sparsify (callable) – Sparsifying transform.
  • unsparsify (callable) – Inverse sparsifying transform.
  • reorder_fun (callable, optional) – Reordering function.
  • unreorder_fun (callable, optional) – Inverse reordering function.
  • mode ({'soft', 'hard', 'garotte', 'greater', 'less'}, optional) – Thresholding mode.
  • alpha (float or callable, optional) – Step size, used for thresholding.
  • alpha_start (float, optional) – Initial alpha to start with if alpha is callable.
  • thresh_sep (bool, optional) – Whether or not to threshold real/imag individually.
  • selective (bool, optional) – Function returning indicies of update to keep at each iter.
  • x (array_like, optional) – The true image we are trying to reconstruct.
  • ignore_residual (bool, optional) – Whether or not to break out of loop if resid increases.
  • ignore_mse (bool, optional) – Whether or not to break out of loop if MSE increases.
  • ignore_ssim (bool, optional) – Whether or not to break out of loop if SSIM increases.
  • disp (bool, optional) – Whether or not to display iteration info.
  • maxiter (int, optional) – Maximum number of iterations.
  • strikes (int, optional) – Number of ending conditions tolerated before giving up.
Returns:

x_hat – Estimate of x.

Return type:

array_like

Notes

Solves the problem:

\[\min_x || y - Ax ||^2_2 + \lambda \text{Sparsify}(x)\]

If x=None, then MSE will not be calculated. You probably want mode=’soft’. For the other options, see docs for pywt.threshold. selective=None will not throw away any updates.