*** Welcome to piglix ***

Piecewise linear function


In mathematics, a piecewise linear function is a real-valued function defined on the real numbers or a segment thereof, whose graph is composed of straight-line sections. It is a piecewise-defined function, each of whose pieces is an affine function.

Usually – but not always – the function is assumed to be continuous; in that case, its graph is a polygonal curve.

The function defined by:

is piecewise linear with four pieces. (The graph of this function is shown to the right.) Since the graph of a linear function is a line, the graph of a piecewise linear function consists of line segments and rays.

Other examples of piecewise linear functions include the absolute value function, the square wave, the sawtooth function, and the floor function.

An approximation to a known curve can be found by sampling the curve and interpolating linearly between the points. An algorithm for computing the most significant points subject to a given error tolerance has been published.

If partitions are already known, linear regression can be performed independently on these partitions. However, continuity is not preserved in that case. A stable algorithm with this case has been derived.

If partitions are not known, the residual sum of squares can be used to choose optimal separation points.

A variant of decision tree learning called model trees learns piecewise linear functions.


...
Wikipedia

...