Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rapid miner: how to add a 'label' attribute to a dataset?

I want to apply a decision tree learning algorithm to a dataset I have imported from a CSV. The problem is that the "tra" input of the Decision Tree block is still red, stating "Input example set must have special attribute 'label'.". How do I add that label? What is it? I have been playing around with it for some time without results. Any help appreciated.

ADDENDUM: the column's titles have been correctly inferred, so I have no clue on what the 'label' is.

like image 373
fstab Avatar asked Apr 08 '13 12:04

fstab


People also ask

What is a label attribute in RapidMiner?

label: This is a special role. An Attribute with the label role acts as a target Attribute for learning Operators. The label is also often called 'target variable' or 'class'. prediction: This is a special role. An Attribute with the prediction role is the result of an application of a learning model.

How do I select attributes in RapidMiner?

Selecting Attributes from the Titanic Data SampleThe first Select Attributes Operator selects a subset of the Attributes. The subset is specified by the attributes parameter. The original output port is connected to the input port of the second Select Attributes Operator. There only nominal Attributes are selected.

What is generate attribute in RapidMiner?

Description. The Generate Attributes operator constructs new attributes from the attributes of the input ExampleSet and arbitrary constants using mathematical expressions. The attribute names of the input ExampleSet might be used as variables in the mathematical expressions for new attributes.


2 Answers

When you import data in RapidMiner, In Step number 4, you need to select the attribute type "label" for the column you wish to classify.

Labelling the classifier column as with "label" attribute

Click Next button in the bottom.

In Step 5, it will ask you to save the import file, Choose any suitable name and click 'Finish'.

like image 149
Mayank Agarwal Avatar answered Oct 14 '22 12:10

Mayank Agarwal


Label is the attribute that represents the target class for classification. "Set Role" operator can set an attribute as label, but you can do that when importing the data - most import operators can be configured to set the role of attributes. "Read CSV" is one of them.

like image 29
Josef Borkovec Avatar answered Oct 14 '22 11:10

Josef Borkovec