"Custom Roles using Set Role operator"

sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager
edited June 2019 in Knowledge Base

 In RapidMiner Studio it is often useful to have certain attributes be "ignored" by modelers, or just have more than one "label" special attribute. Here's a hidden trick to make this happen using the "Titanic" data set:


1. Using the Set Role operator, delete the word "regular" in the target role field and replace it with a name that is not part of the standard list (regular, label, id, etc...).


Screen Shot 2018-02-01 at 10.15.04 AM.png


2. If you want to add additional "roles", go to "set additional roles" and do the same thing:


Screen Shot 2018-02-01 at 10.22.23 AM.png


That's about it. You can see here that the Decision Tree shows Sex and Age in the first tree, and ignores it in the second.


Screen Shot 2018-02-01 at 10.24.10 AM.pngTitanic data set with no custom roles               Screen Shot 2018-02-01 at 10.24.38 AM.pngTitanic Decision Tree with no custom roles. Note "Sex" at top node.


Screen Shot 2018-02-01 at 10.26.14 AM.pngTitanic data set with two custom roles for Sex and Age         Screen Shot 2018-02-01 at 10.27.09 AM.pngsame data set showing the names of the custom roles in the Statistics view



Screen Shot 2018-02-01 at 10.26.23 AM.pngTitanic Decision Tree with custom roles being ignored.


The process XML is attached for reference.







  • Options
    Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn

    I use this trick all the time, it is very helpful!

    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
Sign In or Register to comment.