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

Rank examples by attribute including duplicates

dandresdandres Member Posts: 2 Contributor I
edited November 2018 in Help
Is there an operator or combination of operators that will compute the rank of each example for a selected attribute?

The Sort/Generate ID method won't work here because some of the examples have the same value and thus should have the same rank.  The preference for those "ties" is to compute the lowest rank, not the average rank.

For example:

Value  Rank
100     1
98       2
97       3
97       3
96       5

Answers

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    Hi,

    i don't know a one operator solution.

    You can go for Sort, Generate ID and then use Aggregate and Group By your Value coloumn to calculate min(Id) and average(Value). Should work quite fine.


    Cheers,

    Martin
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • dandresdandres Member Posts: 2 Contributor I
    Thanks, Martin.

    I should have mentioned that I also need to maintain unique rows.  I guess I could use your method and then add one more step to Join back the original by value.
Sign In or Register to comment.