How to apply a "grid" (Discretize) to a continuous attribute?

eldenosoeldenoso Member Posts: 65 Contributor I
edited November 2018 in Help

Hey everyone,

I hope that someone can help me with a problem, which came up to me. The situation is the following: 

I have an example set which contains time and values, ID. Now the problem is, that the difference between the different moments in time is not the same. But to compare different ID's it somehow must be possible do discretize the values to a specific period (e.g. every 15 minutes), so that I can create a stepchart. To make it more cleary here an example:

ID        Time      Values

1         15:12         5

1         15:30         7

1         15:35         8

2         15:15         1

2         15:35         4

What I want to achieve is that the values correspond with specific moments in time. For example every 15 Minutes.

Time       Value 1              Value 2
15:15          5                        1
15:30          7                        1
15:45          8                        4

If there is no change in a value compared to the moment before, rapidminer should take the last known value. 
I really don't know how to realize that and I hope you understand which problem I have.

Thank you for your help :-)

 

 

Best Answer

  • Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn
    Solution Accepted

    I think you want something like the attached process.  It takes your sample data (Read csv) and then uses the Pivot attribute to restructure it by time.  Then it uses the Replace Missing Values (series) operator to use the prior value if it is missing.  And then it filters out for only those time records that end every 15 minutes.  You may need to adapt this somewhat depending on exactly what you are doing (I assume your example data is simplified) but the concepts should still work for you.

     

     

    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts

Answers

  • eldenosoeldenoso Member Posts: 65 Contributor I

    Update:

    Since I did not find the time to test the process correctly. I unofortunately have say that the process doesn't work, because the filter just takes examples out of the example set. The grid on the other hand has to be the same for every example set, that mean it is always in 15-minute-steps also if there is e.g. a 30 minutes step in the example set.

Sign In or Register to comment.