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
Roles and Labels - A Quick Guide
sgenzer
Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager
I continue to see many users get puzzled by "roles" and "labels" in RapidMiner Studio. Here's the simplest way I can explain it...
Your typical data set has rows and columns (known as "examples" and "attributes" in RapidMiner Studio. Columns are also sometimes known as "features".). You can do most things with these attributes just the way they are:
But sometimes you want to give some attributes special "roles" for various reasons. For example, the most common role is an "id":
You see here that there is a NEW, BLUE attribute on the left that I called "sonarID". I made it an 'id' attribute because its ID numbers are unique and should NOT be used in modeling or other purposes. This id column is also useful if you want to join it with other data sets.
How did I make this make this column an 'id'? I used the SET ROLE operator:
The Set Role operator is very easy to use. You select the attribute whose role you want to change (usually from "regular" = no role at all) to some other role. I set it to 'id' in this case. Easy!
This ExampleSet has a new attribute called "Prediction" but you will get a error if you try to use it as it does not have the 'label' role:
Now I use the Set Role operator to change this attribute to 'label':
And voilà! My ExampleSet is ready for modeling.
So what are the other roles and what are they used for? Let's just create a master list....
Don't forget that if an attribute has a role, it is now considered a 'special attribute' and hence must be manually included in many operators such as Select Attributes or Filter Examples:
That's about it! Enjoy and happy RapidMining!
Scott
The ID role
Your typical data set has rows and columns (known as "examples" and "attributes" in RapidMiner Studio. Columns are also sometimes known as "features".). You can do most things with these attributes just the way they are:
But sometimes you want to give some attributes special "roles" for various reasons. For example, the most common role is an "id":
You see here that there is a NEW, BLUE attribute on the left that I called "sonarID". I made it an 'id' attribute because its ID numbers are unique and should NOT be used in modeling or other purposes. This id column is also useful if you want to join it with other data sets.
How did I make this make this column an 'id'? I used the SET ROLE operator:
The Set Role operator is very easy to use. You select the attribute whose role you want to change (usually from "regular" = no role at all) to some other role. I set it to 'id' in this case. Easy!
The Label Role
The 'label' role is one of the most important roles in RapidMiner. It indicates which attribute is the predicted class when used in any modeling operator:This ExampleSet has a new attribute called "Prediction" but you will get a error if you try to use it as it does not have the 'label' role:
Now I use the Set Role operator to change this attribute to 'label':
And voilà! My ExampleSet is ready for modeling.
Other Roles
So what are the other roles and what are they used for? Let's just create a master list....
<b>regular</b> (white) = no role at all - just a plain attribute<br>
<b>id</b> (blue) = an attribute that contains values (numerical or nominal/polynominal) that are unique to this example - i.e. an ID number.<br>
) that will be the predicted class for a modeling operator later on. - i.e. the dependent variable or the column of values you want to predict<b>label</b> (green) = an attribute that contains values (numerical or nominal/polynominal
<b>prediction</b> (green) = an attribute that contains the predicted values (numerical or nominal/polynominal) after a model is applied on new, unseen data.
<b>confidence</b> (yellow) = an attribute <span>that contains numerical confidence values pertaining to a prediction.<br></span>
<b>cluster</b> (yellow) = an attribute that contains nominal/polynominal values that map an example to a particular cluster - e.g. the result of using a clustering operator like k-means
<b>weight</b> (pink) = an attribute that contains the 'weights' of examples with regard to the label. Weights are used in learning processes to set the importance of examples.
Special Attributes
Don't forget that if an attribute has a role, it is now considered a 'special attribute' and hence must be manually included in many operators such as Select Attributes or Filter Examples:
|
Scott
Tagged:
11
Comments
Scott