diff --git a/scico/optimize/_admm.py b/scico/optimize/_admm.py index 5a0a86e81..7409b94f9 100644 --- a/scico/optimize/_admm.py +++ b/scico/optimize/_admm.py @@ -222,7 +222,7 @@ def objective( :code:`self.z_list`. Returns: - scalar: Current value of the objective function. + scalar: Value of the objective function. """ if (x is None) != (z_list is None): raise ValueError("Both or neither of x and z_list must be supplied") @@ -252,7 +252,7 @@ def norm_primal_residual(self, x: Optional[Union[JaxArray, BlockArray]] = None) current iterate :code:`self.x`. Returns: - Current value of primal residual. + Norm of primal residual. """ if x is None: x = self.x @@ -272,7 +272,7 @@ def norm_dual_residual(self) -> float: \mb{z}^{(k-1)}_i}_2^2\right)^{1/2} \;. Returns: - Current value of dual residual. + Current norm of dual residual. """ out = 0.0 @@ -306,7 +306,10 @@ def u_init(self, x0: Union[JaxArray, BlockArray]) -> List[Union[JaxArray, BlockA Initialized to .. math:: - \mb{u}_i = C_i \mb{x}^{(0)} \;. + \mb{u}_i = \mb{0} \;. + + Note that the parameter `x0` is unused, but is provided for + potential use in an overridden method. Args: x0: Initial value of :math:`\mb{x}`. diff --git a/scico/optimize/_ladmm.py b/scico/optimize/_ladmm.py index a2d71fafd..5c52fed1b 100644 --- a/scico/optimize/_ladmm.py +++ b/scico/optimize/_ladmm.py @@ -190,7 +190,7 @@ def objective( iterate :code:`self.z`. Returns: - scalar: Current value of the objective function. + scalar: Value of the objective function. """ if (x is None) != (z is None): raise ValueError("Both or neither of x and z must be supplied") @@ -217,7 +217,7 @@ def norm_primal_residual(self, x: Optional[Union[JaxArray, BlockArray]] = None) :code:`self.x`. Returns: - Current value of primal residual. + Norm of primal residual. """ if x is None: x = self.x @@ -233,7 +233,7 @@ def norm_dual_residual(self) -> float: \norm{\mb{z}^{(k)} - \mb{z}^{(k-1)}}_2 \;. Returns: - Current value of dual residual. + Current norm of dual residual. """ return norm(self.C.adj(self.z - self.z_old)) @@ -262,8 +262,10 @@ def u_init(self, x0: Union[JaxArray, BlockArray]) -> Union[JaxArray, BlockArray] Initialized to .. math:: - \mb{u} = C \mb{x}^{(0)} \;. + \mb{u} = \mb{0} \;. + Note that the parameter `x0` is unused, but is provided for + potential use in an overridden method. Args: x0: Starting point for :math:`\mb{x}`. diff --git a/scico/optimize/_primaldual.py b/scico/optimize/_primaldual.py index 9c4f94eec..244788ccd 100644 --- a/scico/optimize/_primaldual.py +++ b/scico/optimize/_primaldual.py @@ -204,7 +204,7 @@ def objective( :code:`self.x` Returns: - scalar: Current value of the objective function. + scalar: Value of the objective function. """ if x is None: x = self.x @@ -220,7 +220,7 @@ def norm_primal_residual(self) -> float: \tau^{-1} \norm{\mb{x}^{(k)} - \mb{x}^{(k-1)}}_2 \;. Returns: - Current value of primal residual. + Current norm of primal residual. """ return norm(self.x - self.x_old) / self.tau # type: ignore @@ -234,7 +234,7 @@ def norm_dual_residual(self) -> float: \sigma^{-1} \norm{\mb{z}^{(k)} - \mb{z}^{(k-1)}}_2 \;. Returns: - Current value of dual residual. + Current norm of dual residual. """ return norm(self.z - self.z_old) / self.sigma