0
$\begingroup$

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 )$.

$\endgroup$
4
  • 1
    $\begingroup$ Is $$f(x) = g(x)\mathbf{1}_{(0,\infty)}(x) + h(x)\mathbf{1}_{(-\infty,0]}(x)$$ compact enough? $\endgroup$
    – Clement C.
    Mar 27, 2018 at 3:53
  • 2
    $\begingroup$ $f=Hh+(1-H)g$, where $H$ is the Heaviside function. $\endgroup$
    – user545497
    Mar 27, 2018 at 3:55
  • $\begingroup$ @ClementC. never saw such notation but it is compact enough for me. Also I learned something I have never seen before. Thank you $\endgroup$ Mar 27, 2018 at 4:15
  • $\begingroup$ 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$.) $\endgroup$
    – Lubin
    Mar 27, 2018 at 4:20

1 Answer 1

1
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ There is an abuse of notation: $\mathbb{1}_{(0,\infty)}(x)$ or $\mathbb{1}_{\{x>0\}}$, not a mix of both... $\endgroup$
    – Clement C.
    Mar 27, 2018 at 3:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.