Sorting by frequency distribution

JohnnyRapidJohnnyRapid Member Posts: 9 Contributor I
edited November 2018 in Help

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


Best Answer

  • Options
    BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Solution Accepted



    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.







  • Options
    JohnnyRapidJohnnyRapid Member Posts: 9 Contributor I

    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

  • Options
    JohnnyRapidJohnnyRapid Member Posts: 9 Contributor I

    Thank you very much! With a little adjustment the ranking went smoothly for me. 


Sign In or Register to comment.