How to convert ratings (1 to 10) to 3 classes (negative, neutral, positive)

AmikaAmika MemberPosts:5Newbie
I would like to convert ratings (1 to 10) to three disjoint classes representing the polarity of sentiment review (negative, neutral, positive). Is there any function in Rapidminor allows me to do so?

Best Answer

  • ceaperezceaperez MemberPosts:447Unicorn
    edited April 2021 Solution Accepted
    Hi@Amika,

    You can use the Generate Attributes operator nd implement an anidated conditional with your rating Attribute (colum), something like this.
    if(yourratingattribute<=3,"Negative", if((yourratingattribute>3&&yourratingattribute<=7),"Neutral", "Positive"))

    Best.

Answers

  • Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,635Unicorn
    You can also use the Map operator to do this if the original attribute is nominal and not numerical data type.
    Brian T.
    Lindon Ventures
    Data Science Consulting from Certified RapidMiner Experts
Sign InorRegisterto comment.