Julia 1.4.2 - Smooth Arrays

Viewed 471

Is there a function in Julia that is analogous to MATLAB's smooth() function.

MATLAB smooth function: z = smooth(y, span, method) where

  • y -> input array;
  • span -> span of moving average;
  • method -> option between default moving average, lowess, loess etc.

THe result of this operation z is a vector of the same dimension as y which is basically a smoothening of the original array y.

I can't find a simple function in Julia to do that. TimeSeries.jl has function called moving(), but the issue is that we need to transform the input variable first into a TimeArray instead of a normal Array. The output from the function is a TimeArray as well. This is fine, but TimeArray becomes a bit of a problem for some other functions (e.g. those that only allow Array, and not TimeArray).

0 Answers
Related