From 990ef645ac80196e191cd79c7bafd16ee880adba Mon Sep 17 00:00:00 2001 From: Thilo Balke Date: Mon, 17 Oct 2022 10:20:44 -0600 Subject: [PATCH 1/3] Indicator documentation notation Make class docstrings agree with prox docstrings --- scico/functional/_indicator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scico/functional/_indicator.py b/scico/functional/_indicator.py index 1347d8359..a185e2536 100644 --- a/scico/functional/_indicator.py +++ b/scico/functional/_indicator.py @@ -26,7 +26,7 @@ class NonNegativeIndicator(Functional): inf otherwise .. math:: - I(\mb{x}) = \begin{cases} + I_{>= 0}(\mb{x}) = \begin{cases} 0 & \text{ if } x_i \geq 0 \; \forall i \\ \infty & \text{ otherwise} \;. \end{cases} @@ -72,7 +72,7 @@ class L2BallIndicator(Functional): Indicator function for :math:`\ell_2` ball of given radius, :math:`r` .. math:: - I(\mb{x}) = \begin{cases} + I_r(\mb{x}) = \begin{cases} 0 & \text{ if } \norm{\mb{x}}_2 \leq r \\ \infty & \text{ otherwise} \;. \end{cases} From 0970bdf65774873ede9f6115f9facfe5b4c11c05 Mon Sep 17 00:00:00 2001 From: Thilo Balke Date: Mon, 24 Oct 2022 13:43:13 -0600 Subject: [PATCH 2/3] remove subscript from indicator --- scico/functional/_indicator.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scico/functional/_indicator.py b/scico/functional/_indicator.py index a185e2536..319e2f48e 100644 --- a/scico/functional/_indicator.py +++ b/scico/functional/_indicator.py @@ -26,7 +26,7 @@ class NonNegativeIndicator(Functional): inf otherwise .. math:: - I_{>= 0}(\mb{x}) = \begin{cases} + I(\mb{x}) = \begin{cases} 0 & \text{ if } x_i \geq 0 \; \forall i \\ \infty & \text{ otherwise} \;. \end{cases} @@ -48,7 +48,7 @@ def prox( r"""The scaled proximal operator of the non-negative indicator. Evaluate the scaled proximal operator of the indicator over - the non-negative orthant, :math:`I_{>= 0}`, + the non-negative orthant, :math:`I`, .. math:: [\mathrm{prox}_{\lambda I_{>=0}}(\mb{v})]_i = @@ -72,7 +72,7 @@ class L2BallIndicator(Functional): Indicator function for :math:`\ell_2` ball of given radius, :math:`r` .. math:: - I_r(\mb{x}) = \begin{cases} + I(\mb{x}) = \begin{cases} 0 & \text{ if } \norm{\mb{x}}_2 \leq r \\ \infty & \text{ otherwise} \;. \end{cases} @@ -104,10 +104,10 @@ def prox( r"""The scaled proximal operator of the :math:`\ell_2` ball indicator. a :math:`\ell_2` ball - Evaluate the scaled proximal operator of the indicator, :math:`I_r`, + Evaluate the scaled proximal operator of the indicator, :math:`I`, of the :math:`\ell_2` ball with radius :math:`r` .. math:: - \mathrm{prox}_{\lambda I_r}(\mb{v}) = r \frac{\mb{v}}{\norm{\mb{v}}_2}\;. + \mathrm{prox}_{\lambda I}(\mb{v}) = r \frac{\mb{v}}{\norm{\mb{v}}_2}\;. """ return self.radius * v / norm(v) From c5ba0b6dbc3a1484d2aa7c174a1866b12836dc2e Mon Sep 17 00:00:00 2001 From: Thilo Balke Date: Mon, 24 Oct 2022 16:12:21 -0600 Subject: [PATCH 3/3] fix missing subscript --- scico/functional/_indicator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scico/functional/_indicator.py b/scico/functional/_indicator.py index 319e2f48e..596290169 100644 --- a/scico/functional/_indicator.py +++ b/scico/functional/_indicator.py @@ -51,7 +51,7 @@ def prox( the non-negative orthant, :math:`I`, .. math:: - [\mathrm{prox}_{\lambda I_{>=0}}(\mb{v})]_i = + [\mathrm{prox}_{\lambda I}(\mb{v})]_i = \begin{cases} v_i\, & \text{ if } v_i \geq 0 \\ 0\, & \text{ otherwise} \;.