
The ramp function is a
unary real function
In mathematical analysis, and applications in geometry, applied mathematics, engineering, and natural sciences, a function of a real variable is a function whose domain is the real numbers \mathbb, or a subset of \mathbb that contains an inter ...
, whose
graph is shaped like a
ramp. It can be expressed by numerous
definitions
A definition is a statement of the meaning of a term (a word, phrase, or other set of symbols). Definitions can be classified into two large categories: intensional definitions (which try to give the sense of a term), and extensional definit ...
, 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
Machine learning (ML) is a field of study in artificial intelligence concerned with the development and study of Computational statistics, statistical algorithms that can learn from data and generalise to unseen data, and thus perform Task ( ...
, it is commonly known as a
ReLU activation function or a
rectifier
A rectifier is an electrical device that converts alternating current (AC), which periodically reverses direction, to direct current (DC), which flows in only one direction.
The process is known as ''rectification'', since it "straightens" t ...
in analogy to
half-wave rectification in
electrical engineering
Electrical engineering is an engineering discipline concerned with the study, design, and application of equipment, devices, and systems that use electricity, electronics, and electromagnetism. It emerged as an identifiable occupation in the l ...
. In
statistics
Statistics (from German language, German: ', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a s ...
(when used as a
likelihood function
A likelihood function (often simply called the likelihood) measures how well a statistical model explains observed data by calculating the probability of seeing that data under different parameter values of the model. It is constructed from the ...
) 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 () may be defined analytically in several ways. Possible definitions are:
* A
piecewise function:
* Using the
Iverson bracket notation: