The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
How to create dummy variable intervals, such as for times?
I am trying to use the nominal to numerical operator to create dummy variables. One of the attributes I want to convert is time (e.g. 12:30), but there are over 600 different times in the attribute data. I would like to assign each time data to an hour interval. Such as, all times from 7:00-7:59 would convert to a single dummy variable. Is there a way to have RapidMiner do this? Thank you for your help.
0
Answers
With it you can extract only the Hour of your data and use it as a new attribute.
If you don't want to distinguish between dates and only need time of day, simple way to do that is to use GENERATE ATTRIBUTES operator, create a new attribute called 'hour' and use an expression like date_get(date, DATE_UNIT_HOUR), which will generate corresponding hour variable.
In the second case it would be done in a different way. I'd suggest that you use DATE TO NUMERICAL to convert dates to milliseconds elapsed since 1970, then divide that by 1000*60*60 and round the result to get an absolute hour value.
Hope this helps.
Vladimir
http://whatthefraud.wtf