Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor improvements to scico.optimize docs #328

Merged
merged 3 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions scico/optimize/_admm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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.
Value of primal residual.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

norm of the residual or the residual?

"""
if x is None:
x = self.x
Expand Down Expand Up @@ -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}`.
Expand Down
8 changes: 5 additions & 3 deletions scico/optimize/_ladmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -217,7 +217,7 @@ def norm_primal_residual(self, x: Optional[Union[JaxArray, BlockArray]] = None)
:code:`self.x`.

Returns:
Current value of primal residual.
Value of primal residual.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

norm of the residual or the residual?

"""
if x is None:
x = self.x
Expand Down Expand Up @@ -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}`.
Expand Down
2 changes: 1 addition & 1 deletion scico/optimize/_primaldual.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down