renaming does not work?

Fred12Fred12 Member Posts: 344 Unicorn
edited November 2018 in Help
<?xml version="1.0" encoding="UTF-8"?><process version="7.2.002">
<context>
<input>
<location>//Daten/Masterdatensätze/Master3Klassen_nominal</location>
</input>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="7.2.002" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="7.2.002" expanded="true" height="68" name="Retrieve Iris" width="90" x="45" y="238">
<parameter key="repository_entry" value="//Samples/data/Iris"/>
</operator>
<operator activated="true" class="rename_by_replacing" compatibility="7.2.002" expanded="true" height="82" name="Rename by Replacing" width="90" x="246" y="187">
<parameter key="attribute_filter_type" value="single"/>
<parameter key="attribute" value="label"/>
<parameter key="include_special_attributes" value="true"/>
<parameter key="replace_what" value="Iris-setosa"/>
<parameter key="replace_by" value="test"/>
</operator>
<connect from_op="Retrieve Iris" from_port="output" to_op="Rename by Replacing" to_port="example set input"/>
<connect from_op="Rename by Replacing" from_port="example set output" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>

I tried a simple renaming the label column if name is Iris-setosa, I want to give it another name... how is this done?

Best Answer

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn
    Solution Accepted

    Hi Fred,

     

    Rename by Replacing is for Attribute names (the column names) not for the actual values. To do that, use the Replace operator. 

Answers

  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn

    Hi,

     

    Rename by Replacing works exclusively on the column names. It doesn't process the attribute values.

     

    Example sets in RapidMiner have a strict table format. You can't just rename an attribute line-wise.

     

    You could create a new column for each possible value of the label attribute with a Nominal to Numerical operator:

    attribute filter type: single

    attribute: label

    [+] include special attributes

     

Sign In or Register to comment.