🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Ho to do if multiple variable in rapidminer

User: "Hayashi87"
New Altair Community Member
Updated by Jocelyn

Would like to find out how do i go about doing a if condiiton in rapidminer than have a few attributes evaluate to a value.

Eg if (carbrand == '"BMW" OR "AUDI", "CATEGORYACAR", "B")

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "lionelderkrikor"
    New Altair Community Member

    Hi @Hayashi87,

     

    You can use the Generate Attribute operator : 

    Here the process : 

    <?xml version="1.0" encoding="UTF-8"?><process version="8.1.000">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="8.1.000" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="read_excel" compatibility="8.1.000" expanded="true" height="68" name="Read Excel" width="90" x="112" y="34">
    <parameter key="excel_file" value="C:\Users\Lionel\Documents\Formations_DataScience\Rapidminer\Tests_Rapidminer\If_Or\If_Or.xlsx"/>
    <parameter key="imported_cell_range" value="A1:B10"/>
    <parameter key="first_row_as_names" value="false"/>
    <list key="annotations">
    <parameter key="0" value="Name"/>
    </list>
    <list key="data_set_meta_data_information">
    <parameter key="0" value="Carbrand.true.polynominal.attribute"/>
    <parameter key="1" value="Category.true.attribute_value.attribute"/>
    </list>
    </operator>
    <operator activated="true" class="generate_attributes" compatibility="8.1.000" expanded="true" height="82" name="Generate Attributes" width="90" x="313" y="34">
    <list key="function_descriptions">
    <parameter key="Category" value="if(Carbrand==&quot;BMW&quot;||Carbrand==&quot;Audi&quot;,&quot;A&quot;,&quot;B&quot;)"/>
    </list>
    </operator>
    <connect from_op="Read Excel" from_port="output" to_op="Generate Attributes" to_port="example set input"/>
    <connect from_op="Generate Attributes" 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>

    Regards, 

     

    Lionel