Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

"branching issue when updating from version 6.x to 7.2"

kaymankayman Member Posts: 662 Unicorn
edited June 2019 in Help

Using RM7.2 below works :

 

<operator activated="true" class="branch" compatibility="6.4.000" expanded="true" height="82" name="something" width="90" x="45" y="30">
<parameter key="condition_type" value="expression"/>
<parameter key="condition_value" value="equals(&quot;%{myMacro}&quot;,&quot;1&quot;)"/>
<parameter key="expression" value="equals(&quot;%{myMacro}&quot;,&quot;1&quot;)"/>

....

but when upgrading the operator to 7.2 it fails (using else instead of if as to be expected) (as below)

 

<operator activated="true" class="branch" compatibility="7.2.000" expanded="true" height="82" name="something" width="90" x="45" y="30">
<parameter key="condition_type" value="expression"/>
<parameter key="condition_value" value="equals(&quot;%{myMacro}&quot;,&quot;1&quot;)"/>
<parameter key="expression" value="equals(&quot;%{myMacro}&quot;,&quot;1&quot;)"/>

 

So, is there a change in how macro values are to be called between v6.2 and v7.2?

Best Answers

  • bhupendra_patilbhupendra_patil Employee, Member Posts: 168 RM Data Scientist
    Solution Accepted

    6.5 intridocued the eval function for handling macros

    here is an excerpt from 

     

    http://docs.rapidminer.com/studio/releases/6.5/

     

    The macro expression %{} is now a regular function, evaluated just as any other function, and results in the string value of the macro. The new eval("expression") function allows you to evaluate strings as expressions. To resolve the value of a macro (i.e., as a number), use eval(%{macro}). If a macro references an attribute by name, treat it as an expression written as eval(%{macro}) or the shorthand #{macro}. (This shorthand is only applicable for attribute names.)

     

    Also i tried updating XML and it seems to wrok fine, you need the hit the checkbox dialog, if the edited xml has issues then may be it may not update 

  • kaymankayman Member Posts: 662 Unicorn
    Solution Accepted

    Ok, fixed it.

    Seems that I copied the quotation marks when shifting from 6 to 7.

    in the old format it was condition value = equals("%{myMacro}","1")

    in the new format it is expression=equals(%{myMacro},"1")

     

     

    As for the XML, thanks for the tip, I indeed missed the check box part.

Answers

  • kaymankayman Member Posts: 662 Unicorn


    Also, it seems changes in the XML file are no longer reflected anymore in the design pane, making it no longer possible to copy / paste XML 

Sign In or Register to comment.