def xstep(self): r"""Minimise Augmented Lagrangian with respect to :math:`\mathbf{x}`. """ YU = self.Y - self.U self.X = np.asarray(sl.cho_solve_ATAI( self.D, 1.0, self.block_sep0(YU) + self.D.T.dot(self.block_sep1(YU)), self.lu, self.piv), dtype=self.dtype)
def xstep(self): r"""Minimise Augmented Lagrangian with respect to :math:`\mathbf{x}`. """ YU = self.Y - self.U self.X = np.asarray(sl.cho_solve_ATAI( self.D, 1.0, self.block_sep0(YU) + self.D.T.dot(self.block_sep1(YU)), self.lu, self.piv), dtype=self.dtype)
def test_05(self): rho = 1e-1 N = 64 M = 128 K = 32 D = np.random.randn(N, M) X = np.random.randn(M, K) S = D.dot(X) Z = (D.T.dot(D).dot(X) + rho*X - D.T.dot(S)) / rho c, lwr = linalg.cho_factor(D, rho) Xslv = linalg.cho_solve_ATAI(D, rho, D.T.dot(S) + rho*Z, c, lwr) assert(linalg.rrs(D.T.dot(D).dot(Xslv) + rho*Xslv, D.T.dot(S) + rho*Z) < 1e-11)
def test_06(self): rho = 1e-1 N = 128 M = 64 K = 32 D = np.random.randn(N, M) X = np.random.randn(M, K) S = D.dot(X) Z = (D.T.dot(D).dot(X) + rho*X - D.T.dot(S)) / rho c, lwr = linalg.cho_factor(D, rho) Xslv = linalg.cho_solve_ATAI(D, rho, D.T.dot(S) + rho*Z, c, lwr) assert(linalg.rrs(D.T.dot(D).dot(Xslv) + rho*Xslv, D.T.dot(S) + rho*Z) < 1e-14)
def xstep(self): r"""Minimise Augmented Lagrangian with respect to :math:`\mathbf{x}`. """ self.X = np.asarray(sl.cho_solve_ATAI( self.D, self.rho, self.DTS + self.rho * (self.Y - self.U), self.lu, self.piv), dtype=self.dtype) if self.opt['LinSolveCheck']: b = self.DTS + self.rho * (self.Y - self.U) ax = self.D.T.dot(self.D.dot(self.X)) + self.rho*self.X self.xrrs = sl.rrs(ax, b) else: self.xrrs = None
def xstep(self): r"""Minimise Augmented Lagrangian with respect to :math:`\mathbf{x}`. """ self.X = np.asarray(sl.cho_solve_ATAI( self.D, self.rho, self.DTS + self.rho * (self.Y - self.U), self.lu, self.piv), dtype=self.dtype) if self.opt['LinSolveCheck']: b = self.DTS + self.rho * (self.Y - self.U) ax = self.D.T.dot(self.D.dot(self.X)) + self.rho*self.X self.xrrs = sl.rrs(ax, b) else: self.xrrs = None