def xstep(self): r"""Minimise Augmented Lagrangian with respect to :math:`\mathbf{x}`. """ self.X = np.asarray(sl.lu_solve_AATI(self.Z, self.rho, self.SZT + self.rho*(self.Y - self.U), self.lu, self.piv,), dtype=self.dtype)
def test_04(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.dot(X).dot(X.T) + rho*D - S.dot(X.T)) / rho lu, piv = linalg.lu_factor(X, rho) Dslv = linalg.lu_solve_AATI(X, rho, S.dot(X.T) + rho*Z, lu, piv) assert(linalg.rrs(Dslv.dot(X).dot(X.T) + rho*Dslv, S.dot(X.T) + rho*Z) < 1e-11)
def xstep(self): self.X = np.asarray(sl.lu_solve_AATI( self.coefs, self.rho, self.SZT + self.rho * (self.Y - self.U), self.lu, self.piv), dtype=self.dtype)
def xstep(self): """Minimise Augmented Lagrangian with respect to x.""" self.X = np.asarray(sl.lu_solve_AATI(self.A, self.rho, self.SAT + self.rho*(self.Y - self.U), self.lu, self.piv,), dtype=self.dtype)