The ramp function is a unary real function, whose graph is shaped like a ramp. It can be expressed by numerous definitions, for example "0 for negative inputs, output equals input for non-negative inputs". The term "ramp" can also be used for other functions obtained by scaling and shifting, and the function in this article is the unit ramp function (slope 1, starting at 0). In mathematics, the ramp function is also known as the positive part. In machine learning, it is commonly known as a ReLU activation function or a rectifier in analogy to half-wave rectification in electrical engineering. In statistics (when used as a likelihood function) it is known as a tobit model. This function has numerous applications in mathematics and engineering, and goes by various names, depending on the context. There are differentiable variants of the ramp function.
Definitions The ramp function (R(x) : R → R0+) may be defined analytically in several ways. Possible definitions are:
A piecewise function: R ( x ) := { x , x ≥ 0 ; 0 , x < 0 {\displaystyle R(x):={\begin{cases}x,&x\geq 0;\\0,&x<0\end{cases}}}
Using the Iverson bracket notation: R ( x ) := x ⋅ [ x ≥ 0 ] {\displaystyle R(x):=x\cdot [x\geq 0]} or R ( x ) := x ⋅ [ x > 0 ] {\displaystyle R(x):=x\cdot [x>0]}
The max function: R ( x ) := max ( x , 0 ) {\displaystyle R(x):=\max(x,0)}
The mean of an independent variable and its absolute value (a straight line with unity gradient and its modulus): R ( x ) := x + | x | 2 {\displaystyle R(x):={\frac {x+|x|}{2}}} this can be derived by noting the following definition of max(a, b), max ( a , b ) = a + b + | a − b | 2 {\displaystyle \max(a,b)={\frac {a+b+|a-b|}{2}}} for which a = x and b = 0 The Heaviside step function multiplied by a straight line with unity gradient: R ( x ) := x H ( x ) {\displaystyle R\left(x\right):=xH(x)}
The convolution of the Heaviside step function with itself: R ( x ) := H ( x ) ∗ H ( x ) {\displaystyle R\left(x\right):=H(x)*H(x)}
The integral of the Heaviside step function: R ( x ) := ∫ − ∞ x H ( ξ ) d ξ {\displaystyle R(x):=\int _{-\infty }^{x}H(\xi )\,d\xi }
Macaulay brackets: R ( x ) := ⟨ x ⟩ {\displaystyle R(x):=\langle x\rangle }
The positive part of the identity function: R := id + {\displaystyle R:=\operatorname {id} ^{+}}
As a limit function: R ( x ) := lim a → ∞ { 1 a , x = 0 x 1 − e − a x , x ≠ 0 {\displaystyle R\left(x\right):=\lim _{a\to \infty }{\begin{cases}{\frac {1}{a}},\quad x=0\\{\dfrac {x}{1-e^{-ax}}},\quad x\neq 0\end{cases}}}
It could approximated as close as desired by choosing an increasing positive value a > 0 {\displaystyle a>0} .
Applications The ramp function has numerous applications in engineering, such as in the theory of digital signal processing.
… excerpt ends here. Continue reading the full article.




