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