WORD FREEQUENCIES PROBLEM

NewbieStudentNewbieStudent MemberPosts:2Contributor I
Hi, anyone know how can I calculate the frequencies of each males and females? I want to create two new column which are female and male with its frequencies for each rows.

I

Answers

  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified ExpertPosts:953Unicorn
    Hi!

    This is a nice challenge. It can work with a combination of Split, De-Pivot, Split, Aggregate and Pivot.

    First you should check your import process.participant_gendershould be the attribute name, not the first data entry.

    Do you have an ID elsewhere in your data? If not, you can useGenerate IDto identify the rows.

    Then useSplitwith the || separator. Split uses regular expression syntax, so it will be \|\| for this separator value. This will create a number of additional columns with single X::Male or Y::Female entries.

    You can then useDe-Pivotto put thesecolumnsinto therowsbased on the ID. You will get multiple entries for every ID.

    This can again be split up withSpliton the separator ::. This gives you the genders in an attribute. You can then useAggregateto group on the ID and the gender and count the numbers. If you need these on new attributes, usePivotto transfer the gender values on the columns.

    Regards,
    Balázs
  • MarcoBarradasMarcoBarradas Administrator, Employee, RapidMiner Certified Analyst, MemberPosts:271Unicorn
    Hey@NewbieStudent

    You can use this approach.

    To learn more check our free text mining course:https://academy.www.turtlecreekpls.com/learn/course/text-and-web-mining-with-rapidminer/text-and-web-mining/lets-get-started

    < ?xml version = " 1.0 " encoding = " utf - 8 " ?> <过程版本sion="9.10.011">                                                                                     


Sign InorRegisterto comment.