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
Simple Crosstab with totals
I have seen other questions posted here and via Google Searches, but perhaps the solution was for prior RM versions where operators are either no longer available, or are now required paid licenses via 3rd party tools.
My thought was to simply Pivot the data, which works as expected, but the ability to add a total is lacking. In my case, it's just a simple 2x2, which I can do with pivot, but the table is lacking totals.
Could I add them up, sure? But that feels clunky given how powerful, and intuitive, the tool is to use.
Is is not possible without paying for a license via an extension found in the Marketplace? I am really going to enjoy using this as a teaching tool for my class, but it feels like I must be missing something obvious when generating simple 2x2 tables, with totals, is basically EDA 101.
Thanks,
Brock
My thought was to simply Pivot the data, which works as expected, but the ability to add a total is lacking. In my case, it's just a simple 2x2, which I can do with pivot, but the table is lacking totals.
Could I add them up, sure? But that feels clunky given how powerful, and intuitive, the tool is to use.
Is is not possible without paying for a license via an extension found in the Marketplace? I am really going to enjoy using this as a teaching tool for my class, but it feels like I must be missing something obvious when generating simple 2x2 tables, with totals, is basically EDA 101.
Thanks,
Brock
Tagged:
0
Best Answer
-
BalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955
Unicorn
Hi again,
here's the Building Block.
It selects the nominal attribute, Transposes the column, and extract the column name from it.
It should work as long as you have this structure in your data (one nominal attribute, 2x2 or maybe more numerical attributes).
Regards,
Balázs6
Answers
Dortmund, Germany
And to your other question, those examples are definitely more complicated than I am looking for out of the box.
Cheers,
Brock
Scott
Dortmund, Germany
you can do it in RapidMiner.
It needs a few steps:
Unfortunately, it's not a good building block (yet) because the first (grouping) attribute name is hard coded.
Generate Aggregation creates the "total" attribute with the sum of all numeric columns (attribute filter type=value_type, value type=numeric).
Aggregate creates the sums with "use default aggregation", attribute filter type ... numeric, and default aggregation function = sum.
Then we add the text "Total" with the attribute name from the un-aggregated example set and rename the aggregated attributes from "sum(whatever)" to just "whatever" using Rename by Replacing (replace what: sum.(.+).$ ; replace by: $1).
Maybe we could extract the attribute name from the incoming example set, save it as a macro and reuse that in the Generate Attributes step. Then it would be completely generic and a possible building block. But that's an exercise for the reader ;-)
Regards,
Balázs
Maybe my solution is not the easiest but it works:
Dortmund, Germany
Thanks, I am mostly focused in R and python, but I will give it a review.
To circle back, this behaved exactly as expected for my example above. Thanks!