Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
Calculation by Groups
Hi,
This is a newbie's question...I have a data which looks like the below:
Group Value
1 78
1 64
1 75
2 66
2 54
2 72
2 77
3 57
3 59
3 61
Now, i want to do a calculation by groups. And this calculation is ABS("Value" - Group Average). The output datafile should look like the below:
Group Value Result
1 78 5.666666667
1 64 8.333333333
1 75 2.666666667
2 66 1.25
2 54 13.25
2 72 4.75
2 77 9.75
3 57 2
3 59 0
3 61 2
This is exactly group processing. How do we do this in Rapid Miner?
Many thanks for your help,
Shubha
This is a newbie's question...I have a data which looks like the below:
Group Value
1 78
1 64
1 75
2 66
2 54
2 72
2 77
3 57
3 59
3 61
Now, i want to do a calculation by groups. And this calculation is ABS("Value" - Group Average). The output datafile should look like the below:
Group Value Result
1 78 5.666666667
1 64 8.333333333
1 75 2.666666667
2 66 1.25
2 54 13.25
2 72 4.75
2 77 9.75
3 57 2
3 59 0
3 61 2
This is exactly group processing. How do we do this in Rapid Miner?
Many thanks for your help,
Shubha
0
Answers
BR, Shubha
it's actually pretty simple:
Please note that the first chain is only used for generating data like you have described. The ValueIterator together with the aggregation and the merge do the trick.
All the best,
Ingo
A question is:
Can I do this without splitting the data into 3 data parts( according to the groups)...
with a different (and more complex) setup for RM 4.4 (coming this week): yes, it would also be possible without "dividing" the data. But what's wrong with it? Actually, the different data parts are only views on the same data set and therefore should be no problem at all.
Cheers,
Ingo
Thanks,
Shubha
One last question,
While I join daasets in the end by "ExampleSetMerge", the group order is changed. How to get back the original group order while merging? Is there a way to reverse the order number of the 3 different datasets generated?
Thanks,
Shubha
Cheers,
Ingo
We have the generated split datasets. While joining itself, can we join in the order? Or atleast in the descending order? This would help another problem of mine...
Thanks, Shubha