Basis Function

Basis function is the generalized form of the above two approaches. Basis are functions on X that transform it. Thus, when doing regression with basis functions, we simply regress y with a family of transformations of x.

For polynomial regression, the basis are powers of x and for step function, the basis are constant values in different ranges.