Hello,
I'm rather new to RapidMiner, and I'm currently stuck at a point where I did't really expect to encounter any problems. I'm trying to implement something that is called
control level processing in some other environments I use. I don't know whether that's a generally accepted term, though, so I'll describe what I'm trying to achieve briefly.
After some processing, I've got data that looks roughly like this:
KEY1 | KEY2 | DATE | VALUE
AAAA | aaaa | 2015-01-01 | 10
AAAA | aaaa | 2015-01-02 | 12
AAAA | aaaa | 2015-01-03 | 8
AAAA | bbbb | 2015-01-01 | 20
AAAA | bbbb | 2015-01-02 | 18
AAAA | bbbb | 2015-01-03 | 19
BBBB | cccc | 2015-01-01 | 15
BBBB | cccc | 2015-01-02 | 12
BBBB | cccc | 2015-01-03 | 17
BBBB | aaaa | 2015-01-01 | 12
BBBB | aaaa | 2015-01-02 | 13
BBBB | aaaa | 2015-01-03 | 9
I have already succeeded in dynamically generating a separate graph for each combination of [tt]KEY1[/tt] and [tt]KEY2[/tt] (both polynomials). I don't know whether that's the most efficient way to do so, but here is what I did:
- Remember the entire ExampleSet
- Select Attributes to only keep [tt]KEY1[/tt] and [tt]KEY2[/tt]
- Remove Duplicates, gibing me a list of distinct [tt]KEY1[/tt] and [tt]KEY2[/tt] pairs
- Using Loop Examples, process that list
- In the loop sub-workflow, use Extract Macro to determine the current [tt]KEY1[/tt] and [tt]KEY2[/tt]
- Recall the stored ExampleSet
- Filter Examples to keep only the entries belonging to the current [tt]KEY1[/tt] and [tt]KEY2[/tt]
- Report the filtered set to the (previously opened) report
This works so far. Now I want to introduce intermediate headings (sections) because [tt]KEY1[/tt] and [tt]KEY2[/tt] in fact form a hierarchy. I need the report TOC to look like this (for the example data above):
1. AAAA
1.1 aaaa
1.2 bbbb
2. BBBB
2.1 cccc
2.2 aaaa
The secondary header level isn't a problem, but the primary level is unexpectedly hard. I've tried to store the previous value of [tt]KEY1[/tt] using Set Macro and then use a Branch operator to conditionally apply an Add Section operator and then update the macro, but so far, I haven't been able to get this working. I believe I need to use the condition type expression with a condition value like [tt]KEY1 <> %{prev_key1}[/tt], but all I get is runtime errors. Unfortunately, neither the documentation nor the example process are of much use to me. Am I following the right approach, and how do I get the Branch operator (or any other operator) to do what I need?
Thanks
Volker