1. A computer implemented method for decomposing a signal into one or more component functions, the method comprising: receiving as an input function a signal corresponding to time series data, the signal being represented in an original data space; and decomposing the input function, the decomposing comprising: transforming the input function into a sawtooth function in sawtooth space; determining an upper envelope by connecting successive maxima of the sawtooth function; determining a lower envelope by connecting successive minima of the sawtooth function; calculating a residue function based on the upper envelope and the lower envelope; calculating a component function based on the residue function and the sawtooth function; and transforming the upper envelope, the lower envelope, the residue function, and the component function from the sawtooth space to the original data space.