Miscellaneous
Elementwise transforms
signal.apply()
signal.apply()signal.apply(function)Apply a function to each element of the signal.
- Parameters:
function– The name of the function to apply. A non-exhaustive list of standard function transform is:log(logarithm),exp(exponentiation),sqrt(square root),abs(absolute value),tanh(hyperbolic tangent).
A use case for transforming data is to get better properties when creating a model. In many cases, a model performs better if the data has been transformed with the logarithm before estimating the model. Here is an example on how to transform the signal:
US_CivilianUnemploymentRate_Monthly.apply('log')It is also possible to do this in a modelling context. Then doing something like this can work:
predict(US_CivilianUnemploymentRate_Monthly.apply('log')).apply('exp')We apply “exp” in the end to transform the predictions back to the original scale.
Updated about 8 hours ago