Skip to content

Commit 6daf81c

Browse files
authored
Fixed Documentation of the Huber Function (#721)
1 parent fae918e commit 6daf81c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/src/manual/operations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ any solver that can solve both LPs and SOCPs can solve the problem.
8383
| `square(x), x^2` | $x^2$ | convex | increasing on $x \ge 0$ decreasing on $x \le 0$ | PR : $x$ is scalar |
8484
| `x .^ 2` | $x.^2$ | convex | increasing on $x \ge 0$ decreasing on $x \le 0$ | elementwise |
8585
| `geomean(x, y)` | $\sqrt{xy}$ | concave | increasing | IC: $x\ge0$, $y\ge0$ |
86-
| `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$ |
86+
| `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$ |
8787

8888
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)`.
8989

src/supported_operations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ The epigraph of the Huber loss function:
851851
2M|x| - M^2 & |x| > M
852852
\\end{cases}
853853
```
854-
where \$M \\ge 1\$.
854+
where \$M > 0\$.
855855
856856
## Examples
857857

0 commit comments

Comments
 (0)