Skip to main content
Question

Moving average

  • 26 February 2013
  • 3 replies
  • 26 views

Looking for optimal way to compute moving average on an attribute, based on a definable amount of freq of features.

 

 

Any ideas on how to do this without writing a script?
We're just in the process of adding this functionality to FME 2013 SP1. This new multi-feature formula functionality will allow you to create functions and expressions across several features - which would include creating a moving average. Currently this is pretty tricky to do in FME.

 

On a related topic - StatisticsCalculator will now allow you to select several several attributes to run statistics on.
If you're stuck with FME 2012 or earlier, I would suggest using a PythonCaller inside a custom transformer. This should make it relatively easy to calculate the running averages on a selected list of attributes.

 

 

Let me know if this is of interest, and I'll give you some hints that are more specific.

 

 

David
thanks for the response.    i actually was able to do it by creating a cummulative sum field, then joining 2 data streams on ID + moving freq amount, and taking the difference between the cummulatives at each ID.  

 

 

Looking forward to the multi feature formula capabilities.

Reply