# Is there a standard notation for the following function?

In machine learning the following function is used pretty often: $$f(x) = \left\{\begin{matrix} g(x) & x > 0\\ h(x) & x \leqslant 0 \end{matrix}\right.$$

Is there a standard more compact notation? Something like $\varsigma \left ( g(x), h(x) \right )$.

• Is $$f(x) = g(x)\mathbf{1}_{(0,\infty)}(x) + h(x)\mathbf{1}_{(-\infty,0]}(x)$$ compact enough? Mar 27, 2018 at 3:53
• $f=Hh+(1-H)g$, where $H$ is the Heaviside function.
– user545497
Mar 27, 2018 at 3:55
• @ClementC. never saw such notation but it is compact enough for me. Also I learned something I have never seen before. Thank you Mar 27, 2018 at 4:15
• I don’t think that one should expect that there will be a standard notation for any particular function, beyond the definition. After all, there isn’t even a standard notation for the $n$-th power function. (We say, “$x^n$”, but that’s just stating the value at a general $x$.) Mar 27, 2018 at 4:20

As far as I can tell, no. The closest you can get is writing $$f(x) = \mathbb{1}_{x\leq 0}(x) \cdot h(x) + \mathbb{1}_{x>0}(x)\cdot g(x)$$ where $1_A: A \to \{0, 1\}$ is the Indicator function.
• There is an abuse of notation: $\mathbb{1}_{(0,\infty)}(x)$ or $\mathbb{1}_{\{x>0\}}$, not a mix of both... Mar 27, 2018 at 3:55