renaming does not work?

Fred12
Fred12 New Altair Community Member
edited November 2024 in Community Q&A
<?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?

Tagged:

Best Answer

  • Thomas_Ott
    Thomas_Ott New Altair Community Member
    Answer ✓

    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

  • Thomas_Ott
    Thomas_Ott New Altair Community Member
    Answer ✓

    Hi Fred,

     

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

  • BalazsBaranyRM
    BalazsBaranyRM New Altair Community Member

    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

     

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.