Search code examples
timestamppreprocessorwekarapidminer

RapidMiner TimeStamp preprocessing


I am trying to make predictions with three different sensor data. Each sensor has a periodicity, and measurement instants are not the same (e.g. sensor1data_time=10:01; sensor2data_timestamp= 10:03; sensor3data_timestamp= 10:05).

I did this task manually for a demo, but now I need to do automatize it in order to develop a prediction model.

Any preprocessing task recommended??

Thanks in advance


Solution

  • I would round the times to something like the nearest ten minutes. The operator to use is Generate Attributes. I tend to use the number of seconds since 01-01-1970. The following fragments show the functions you could use. I'm assuming you have an attribute called datestr containing a date in this sort of format 13-01-2016 23:01:01.

    attribute name    function expression    
    -------------------------------------------------------------------
    date              date_parse_custom(datestr, "dd-MM-yyyy HH:mm:ss")
    epochdate         date_diff(date_parse(0), date)/1000
    dateToTenMins     600*round(epochdate/600)
    

    The epoch date is in milliseconds so dividing by 1000 gives seconds.