<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Ramp_function</id>
	<title>Ramp function - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Ramp_function"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Ramp_function&amp;action=history"/>
	<updated>2026-05-05T20:24:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Ramp_function&amp;diff=2845089&amp;oldid=prev</id>
		<title>191.125.52.120: /* Definitions */fixing sign mistake</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Ramp_function&amp;diff=2845089&amp;oldid=prev"/>
		<updated>2024-08-08T03:45:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Definitions: &lt;/span&gt;fixing sign mistake&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Piecewise function that clamps its input to be non-negative}}&lt;br /&gt;
{{Refimprove|date=January 2017}}&lt;br /&gt;
[[File:Ramp function.svg|thumb|325px|[[Graph of a function|Graph]] of the ramp function]]&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;ramp function&amp;#039;&amp;#039;&amp;#039; is a [[unary function|unary]] [[real function]], whose [[graph of a function|graph]] is shaped like a [[ramp]]. It can be expressed by numerous [[#Definitions|definitions]], for example &amp;quot;0 for negative inputs, output equals input for non-negative inputs&amp;quot;. The term &amp;quot;ramp&amp;quot; can also be used for other functions obtained by [[scaling and shifting]], and the function in this article is the &amp;#039;&amp;#039;unit&amp;#039;&amp;#039; ramp function (slope 1, starting at 0).&lt;br /&gt;
&lt;br /&gt;
In mathematics, the ramp function is also known as the [[positive part]].&lt;br /&gt;
&lt;br /&gt;
In [[machine learning]], it is commonly known as a [[Rectifier_(neural_networks)|ReLU]] [[activation function]]&amp;lt;ref name=&amp;#039;brownlee&amp;#039;&amp;gt;{{cite web |last1=Brownlee |first1=Jason |title=A Gentle Introduction to the Rectified Linear Unit (ReLU) |url=https://machinelearningmastery.com/rectified-linear-activation-function-for-deep-learning-neural-networks/ |website=Machine Learning Mastery |access-date=8 April 2021 |date=8 January 2019}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;medium-relu&amp;quot;&amp;gt;{{cite web |last1=Liu |first1=Danqing |title=A Practical Guide to ReLU |url=https://medium.com/@danqing/a-practical-guide-to-relu-b83ca804f1f7 |website=Medium |access-date=8 April 2021 |language=en |date=30 November 2017}}&amp;lt;/ref&amp;gt; or a [[Rectifier (neural networks)|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]].&lt;br /&gt;
&lt;br /&gt;
This function has numerous [[#Applications|applications]] in mathematics and engineering, and goes by various names, depending on the context. There are [[Rectifier_(neural_networks)#Other_non-linear_variants|differentiable variants]] of the ramp function.&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
The ramp function ({{math|&amp;#039;&amp;#039;R&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;) : &amp;#039;&amp;#039;&amp;#039;R&amp;#039;&amp;#039;&amp;#039; → &amp;#039;&amp;#039;&amp;#039;R&amp;#039;&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;+&amp;lt;/sup&amp;gt;}}) may be defined analytically in several ways.  Possible definitions are:&lt;br /&gt;
* A [[piecewise function]]: &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;R(x) := \begin{cases}&lt;br /&gt;
x, &amp;amp; x \ge 0; \\&lt;br /&gt;
0, &amp;amp; x&amp;lt;0&lt;br /&gt;
\end{cases} &amp;lt;/math&amp;gt;&lt;br /&gt;
* Using the [[Iverson bracket]] notation: &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;R(x) := x \cdot [x \geq 0]&amp;lt;/math&amp;gt; or &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;R(x) := x \cdot [x &amp;gt; 0]&amp;lt;/math&amp;gt;&lt;br /&gt;
* The [[Maxima and minima|max function]]: &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;R(x) := \max(x,0) &amp;lt;/math&amp;gt;&lt;br /&gt;
* The [[arithmetic mean|mean]] of an [[independent variable]] and its [[absolute value]] (a straight line with unity gradient and its modulus): &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;R(x) := \frac{x+|x|}{2} &amp;lt;/math&amp;gt; this can be derived by noting the following definition of {{math|max(&amp;#039;&amp;#039;a&amp;#039;&amp;#039;, &amp;#039;&amp;#039;b&amp;#039;&amp;#039;)}}, &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt; \max(a,b) = \frac{a + b + |a - b|}{2} &amp;lt;/math&amp;gt; for which {{math|1=&amp;#039;&amp;#039;a&amp;#039;&amp;#039; = &amp;#039;&amp;#039;x&amp;#039;&amp;#039;}} and {{math|1=&amp;#039;&amp;#039;b&amp;#039;&amp;#039; = 0}}&lt;br /&gt;
* The [[Heaviside step function]] multiplied by a straight line with unity gradient: &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;R\left( x \right) := x H(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
* The [[convolution]] of the Heaviside step function with itself: &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;R\left( x \right) := H(x) * H(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
* The [[integral]] of the Heaviside step function:&amp;lt;ref&amp;gt;{{MathWorld|title=Ramp Function|id=RampFunction}}&amp;lt;/ref&amp;gt; &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;R(x) := \int_{-\infty}^{x} H(\xi)\,d\xi&amp;lt;/math&amp;gt;&lt;br /&gt;
* [[Macaulay brackets]]: &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;R(x) := \langle x\rangle&amp;lt;/math&amp;gt;&lt;br /&gt;
* The [[positive and negative parts|positive part]] of the [[identity function]]: &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;R := \operatorname{id}^+&amp;lt;/math&amp;gt;&lt;br /&gt;
* As a limit function: &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;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} &amp;lt;/math&amp;gt;&lt;br /&gt;
It could approximated as close as desired by choosing an increasing positive value &amp;lt;math&amp;gt; a&amp;gt;0 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
The ramp function has numerous applications in engineering, such as in the theory of [[digital signal processing]].&lt;br /&gt;
&lt;br /&gt;
[[File:Long call option.svg|thumb|Payoff and profits from buying a [[call option]].]]&lt;br /&gt;
In [[finance]], the payoff of a [[call option]] is a ramp (shifted by &amp;#039;&amp;#039;strike price&amp;#039;&amp;#039;). Horizontally flipping a ramp yields a [[put option]], while vertically flipping (taking the negative) corresponds to &amp;#039;&amp;#039;selling&amp;#039;&amp;#039; or being &amp;quot;short&amp;quot; an option. In finance, the shape is widely called a &amp;quot;[[hockey stick]]&amp;quot;, due to the shape being similar to an [[ice hockey stick]].&lt;br /&gt;
&lt;br /&gt;
[[File:Friedmans mars hinge functions.png|thumb|A mirrored pair of [[Multivariate adaptive regression splines#Hinge functions|hinge functions]] with a knot at x=3.1]]&lt;br /&gt;
In [[statistics]], [[Multivariate adaptive regression splines#Hinge functions|hinge functions]] of [[multivariate adaptive regression splines]] (MARS) are ramps, and are used to build [[regression model]]s.&lt;br /&gt;
&lt;br /&gt;
== Analytic properties ==&lt;br /&gt;
&lt;br /&gt;
=== Non-negativity ===&lt;br /&gt;
&lt;br /&gt;
In the whole [[domain of a function|domain]] the function is non-negative, so its [[absolute value]] is itself, i.e.&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\forall x \in \Reals: R(x) \geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\left| R (x) \right| = R(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
{{math proof | by the mean of definition 2, it is non-negative in the first quarter, and zero in the second; so everywhere it is non-negative.}}&lt;br /&gt;
&lt;br /&gt;
=== Derivative ===&lt;br /&gt;
Its derivative is the [[Heaviside step function]]:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;R&amp;#039;(x) = H(x)\quad \mbox{for } x \ne 0.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Second derivative ===&lt;br /&gt;
The ramp function satisfies the differential equation:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt; \frac{d^2}{dx^2} R(x - x_0) = \delta(x - x_0), &amp;lt;/math&amp;gt;&lt;br /&gt;
where {{math|&amp;#039;&amp;#039;δ&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;)}} is the [[Dirac delta]]. This means that {{math|&amp;#039;&amp;#039;R&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;)}} is a [[Green&amp;#039;s function]] for the second derivative operator. Thus, any function, {{math|&amp;#039;&amp;#039;f&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;)}}, with an integrable second derivative, {{math|&amp;#039;&amp;#039;f&amp;#039;&amp;#039;″(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;)}}, will satisfy the equation:&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt; f(x) = f(a) + (x-a) f&amp;#039;(a) + \int_{a}^b R(x - s) f&amp;#039;&amp;#039;(s) \,ds \quad \mbox{for }a &amp;lt; x &amp;lt; b .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Fourier transform]] ===&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt; \mathcal{F}\big\{ R(x) \big\}(f) = \int_{-\infty}^{\infty} R(x) e^{-2\pi ifx} \, dx = \frac{i\delta &amp;#039;(f)}{4\pi}-\frac{1}{4 \pi^2 f^2}, &amp;lt;/math&amp;gt;&lt;br /&gt;
where {{math|&amp;#039;&amp;#039;δ&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;)}} is the [[Dirac delta]] (in this formula, its [[derivative]] appears).&lt;br /&gt;
&lt;br /&gt;
=== [[Laplace transform]] ===&lt;br /&gt;
The single-sided [[Laplace transform]] of {{math|&amp;#039;&amp;#039;R&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;)}} is given as follows,&amp;lt;ref&amp;gt;{{Cite web| url=https://lpsa.swarthmore.edu/LaplaceXform/FwdLaplace/LaplaceFuncs.html#Ramp| title=The Laplace Transform of Functions| website=lpsa.swarthmore.edu |access-date=2019-04-05}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt; \mathcal{L}\big\{R(x)\big\} (s) = \int_{0}^{\infty} e^{-sx}R(x)dx = \frac{1}{s^2}. &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Algebraic properties  ==&lt;br /&gt;
&lt;br /&gt;
=== Iteration invariance ===&lt;br /&gt;
Every [[iterated function]] of the ramp mapping is itself, as&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt; R \big( R(x) \big) = R(x) .&amp;lt;/math&amp;gt;&lt;br /&gt;
{{math proof | proof =&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt; R \big( R(x) \big) := \frac{R(x)+|R(x)|}{2} = \frac{R(x)+R(x)}{2} = R(x) .&amp;lt;/math&amp;gt;&lt;br /&gt;
This applies the [[#Non-negativity|non-negative property]].}}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Tobit model]]&amp;lt;!-- Models non-negative output as ramp function of a latent variable. --&amp;gt;&lt;br /&gt;
* [[Rectifier (neural networks)]]&amp;lt;!-- Applications of ramp function and show some approximations. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Real analysis]]&lt;br /&gt;
[[Category:Special functions]]&lt;/div&gt;</summary>
		<author><name>191.125.52.120</name></author>
	</entry>
</feed>