def ystep(self): AXU = self.AX + self.U Y0 = sl.shrink1(self.block_sep0(AXU) - self.S, (1.0/self.rho)*self.W) Y1 = sl.shrink1(self.block_sep1(AXU), (self.lmbda/self.rho)*self.wl1) self.Y = self.block_cat(Y0, Y1) super(cbpdn.ConvBPDNMaskDcpl, self).ystep()
def ystep(self): r"""Minimise Augmented Lagrangian with respect to :math:`\mathbf{y}`. """ self.Y = np.asarray(sl.shrink1(self.S - self.AX - self.U, self.lmbda/self.rho), dtype=self.dtype)
def ystep(self): """Minimise Augmented Lagrangian with respect to y.""" self.Y = np.asarray(sl.shrink1(self.AX + self.U, (self.lmbda / self.rho) * self.wl1), dtype=self.dtype) super(BPDN, self).ystep()
def ystep(self): """Minimise Augmented Lagrangian with respect to :math:`\mathbf{y}`.""" self.Y[...,0:-1] = sl.shrink2(self.AX[...,0:-1] + self.U[...,0:-1], (self.lmbda/self.rho)*self.Wtvna, axis=self.saxes) self.Y[...,-1] = sl.shrink1(self.AX[...,-1] + self.U[...,-1] - self.S, (1.0/self.rho)*self.Wdf)
def par_y1step(i): r"""Minimise Augmented Lagrangian with respect to :math:`\mathbf{y}_{1,G_i}`, one of the disjoint problems of optimizing :math:`\mathbf{y}_1`. Parameters ---------- i : int Index of grouping to update """ global mp_Y1 grpind = slice(mp_grp[i], mp_grp[i+1]) XU1 = mp_X[grpind] + 1/mp_alpha*mp_U1[grpind] if mp_wl1.shape[mp_axisM] is 1: gamma = mp_lmbda/(mp_alpha**2*mp_rho)*mp_wl1 else: gamma = mp_lmbda/(mp_alpha**2*mp_rho)*mp_wl1[grpind] Y1 = sl.shrink1(XU1, gamma) if mp_NonNegCoef: Y1[Y1 < 0.0] = 0.0 if mp_NoBndryCross: for n in range(len(mp_Nv)): Y1[(slice(None),) + (slice(None),)*n + (slice(1-mp_Dshp[n], None),)] = 0.0 mp_Y1[mp_grp[i]:mp_grp[i+1]] = Y1
def ystep(self): """Minimise Augmented Lagrangian with respect to y.""" self.Y[..., 0:-1] = sl.shrink2(self.AX[..., 0:-1] + self.U[..., 0:-1], (self.lmbda / self.rho) * self.Wtvna) self.Y[..., -1] = sl.shrink1(self.AX[..., -1] + self.U[..., -1] - self.S, (1.0 / self.rho))
def cbpdn_ystep(k): """Do the Y step of the cbpdn stage. The only parameter is the slice index `k` and there are no return values; all inputs and outputs are from and to global variables. """ AXU = mp_Z_X[k] + mp_Z_U[k] mp_Z_Y[k] = spl.shrink1(AXU, (mp_lmbda / mp_xrho))
def cbpdn_ystep(k): """Do the Y step of the cbpdn stage. There are no parameters or return values because all inputs and outputs are from and to global variables. """ AXU = mp_Z_X[k] + mp_Z_U[k] mp_Z_Y[k] = spl.shrink1(AXU, (mp_lmbda / mp_xrho))
def ystep(self): r"""Minimise Augmented Lagrangian with respect to :math:`\mathbf{y}`.""" AXU = self.AX + self.U self.Y[..., 0:-1] = sl.shrink2(AXU[..., 0:-1], self.mu / self.rho) self.Y[..., -1] = sl.shrink1(AXU[..., -1], (self.lmbda / self.rho) * self.Wl1)
def ystep(self): r"""Minimise Augmented Lagrangian with respect to :math:`\mathbf{y}`.""" AXU = self.AX + self.U self.block_sep0(self.Y)[:] = sl.shrink1( self.block_sep0(AXU), (self.lmbda/self.rho) * self.Wl1) self.block_sep1(self.Y)[:] = sl.shrink2( self.block_sep1(AXU), self.mu/self.rho, axis=(self.cri.axisC, -1))
def ystep(self): r"""Minimise Augmented Lagrangian with respect to :math:`\mathbf{y}`. """ AXU = self.AX + self.U Y0 = np.asarray(sl.shrink1(self.block_sep0(AXU), self.wl1 / self.rho), dtype=self.dtype) if self.opt['NonNegCoef']: Y0[Y0 < 0.0] = 0.0 Y1 = sl.proj_l2ball(self.block_sep1(AXU), self.S, self.epsilon, axes=0) self.Y = self.block_cat(Y0, Y1)
def cbpdnmd_ystep(k): """Do the Y step of the cbpdn stage. The only parameter is the slice index `k` and there are no return values; all inputs and outputs are from and to global variables. """ if mp_W.shape[0] > 1: W = mp_W[k] else: W = mp_W AXU0 = mp_DX[k] - mp_S[k] + mp_Z_U0[k] AXU1 = mp_Z_X[k] + mp_Z_U1[k] mp_Z_Y0[k] = mp_xrho * AXU0 / (W**2 + mp_xrho) mp_Z_Y1[k] = spl.shrink1(AXU1, (mp_lmbda / mp_xrho))
def eval_proxop(self, V): """Compute proximal operator of :math:`g`.""" return np.asarray(sl.shrink1(V, (self.lmbda / self.L) * self.wl1), dtype=self.dtype)
def ystep(self): r"""Minimise Augmented Lagrangian with respect to :math:`\mathbf{y}`. """ self.Y = sl.shrink1(self.AX - self.S + self.U, self.Wdf / self.rho)
def prox_g(self, X, rho): r""" Proximal operator of :math:`(\lambda/\rho) \|\cdot\|_1`. """ return spl.shrink1(X, (self.lmbda / rho))
def prox_g(self, X, rho): r""" Proximal operator of :math:`(\lambda/\rho) \|\cdot\|_1`. """ return spl.shrink1(X, (self.lmbda/rho))
def xprox(self, X, Lx): """Proximal operator for sparse representation.""" return sl.shrink1(X, self.lmbda / Lx)
def ystep(self): """Minimise Augmented Lagrangian with respect to y.""" self.Y = sl.shrink1(self.AX - self.S + self.U, self.Wdf / self.rho)
def y1step(self): self._Y1 = sl.shrink1((self._AX1 + self._U1) / self.gamma, self.lmbda/self.rho/self.gamma/self.gamma)
def eval_proxop(self, V): """ Compute proximal operator of :math:`g` .""" return sl.shrink1(V, (self.lmbda / self.L) * self.wl1)
def eval_proxop(self, V): return sl.shrink1(V, self.lmbda / self.L)