From 8aded5b8bcc1e3a4454b529c062d1c0f8f828f34 Mon Sep 17 00:00:00 2001 From: Royi Date: Mon, 2 Jun 2025 18:58:44 +0300 Subject: [PATCH 1/2] Fixed Documentation of the Huber Function --- docs/src/manual/operations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/manual/operations.md b/docs/src/manual/operations.md index f84f2776d..8a4869c29 100644 --- a/docs/src/manual/operations.md +++ b/docs/src/manual/operations.md @@ -83,7 +83,7 @@ any solver that can solve both LPs and SOCPs can solve the problem. | `square(x), x^2` | $x^2$ | convex | increasing on $x \ge 0$ decreasing on $x \le 0$ | PR : $x$ is scalar | | `x .^ 2` | $x.^2$ | convex | increasing on $x \ge 0$ decreasing on $x \le 0$ | elementwise | | `geomean(x, y)` | $\sqrt{xy}$ | concave | increasing | IC: $x\ge0$, $y\ge0$ | -| `huber(x, M=1)` | $\begin{cases} x^2 &\|x\| \leq M \\ 2M\|x\| - M^2 &\|x\| > M \end{cases}$ | convex | increasing on $x \ge 0$ decreasing on $x \le 0$ | PR: $M>=1$ | +| `huber(x, M=1)` | $\begin{cases} x^2 &\|x\| \leq M \\ 2M\|x\| - M^2 &\|x\| > M \end{cases}$ | convex | increasing on $x \ge 0$ decreasing on $x \le 0$ | PR: $M > 0$ | Note that for `p=1` and `p=Inf`, the function `norm(x,p)` is a linear-program representable, and does not need a SOCP solver, and for a matrix `x`, `norm(x,p)` is defined as `norm(vec(x), p)`. From b2c6b6393b36fcfee1c5f54e3098f483c29668ee Mon Sep 17 00:00:00 2001 From: Royi Date: Mon, 2 Jun 2025 19:03:30 +0300 Subject: [PATCH 2/2] Fixed Huber Loss Documentation --- src/supported_operations.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/supported_operations.jl b/src/supported_operations.jl index f189efafe..f5e58f308 100644 --- a/src/supported_operations.jl +++ b/src/supported_operations.jl @@ -851,7 +851,7 @@ The epigraph of the Huber loss function: 2M|x| - M^2 & |x| > M \\end{cases} ``` -where \$M \\ge 1\$. +where \$M > 0\$. ## Examples