Sorting by frequency distribution
Hello, everyone,
I'm having a little problem preparing my records for a prediction right now. I have a list of production data with the installed quantities of parts (material numbers with N28 etc.). Each part can have different materials. In the table I have shown 4 parts as an example:
Now I need a table where per product the materials are sorted by quantity in the row. So that I only have one line for each piece, where the material descriptions are listed in descending order:
It's probably easy, and I'm just being silly.
Best regards
Johnny
Best Answer
-
BalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
Hi!
You're not silly, but it's a complicated problem.
First, you would need the ranks of materials by ID. This kind of groupwise application is available in the RapidMiner Window Functions project. (Or you implement it yourself in a process with Loop Values, Filter, Sort, Generate Id etc.)
Then you would use the Pivot operator with the Id as the grouping attribute and the newly created rank attribute as the index. This would give you a table like your example.
Regards,
Balázs
1
Answers
Hi Balázs
Thanks for the advice. I will look at the RapidMiner Window Function project and try to apply it to my problem.
I'll let you know if it worked.
Many thanks
Johnny
Thank you very much! With a little adjustment the ranking went smoothly for me.