Time/Rolling Window Calculations

igauz
igauz New Altair Community Member
edited November 5 in Community Q&A
Hi - I'm new to RapidMiner! I've some time series/tick data and wish to calculate rolling mean or run a custom aggregation function over last few minutes/hours of tick data. How can I do that? Or is there a way I can specify a frequency to re-sample the data (say '5m') and then do a rolling mean over the end result?

I've seen the Window feature but that seems to be based on event count and doesn't aggregate by time interval components (days, minutes, hours, etc).
Tagged:

Answers

  • JEdward
    JEdward New Altair Community Member
    Several ways to do this

    I would suggest an easy way which would be to create an attribute which groups your customer time frequencies together - o for example you might use date to numerical to convert your dates to minutes from epoch, otherwise generate attributes. 
    Next perform your aggregation of that data grouped by your grouping attribute, then use the Moving Average operator with a window of (5 for 5 minute intervals) to calculate the values you want. 

    Also the Moving Average operator is a bit sneaky in it's name it can also perform sum, variance, std dev, etc so isn't just limited to averages.