The Altair Community is migrating to a new platform to provide a better experience for you. The RapidMiner Community will merge with the Altair Community at the same time. In preparation for the migration, both communities are on read-only mode from July 15th - July 24th, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here.

"[Solved] Generate macro thows error on calculating with macros"

qwertz2qwertz2 Member Posts: 49 Guru
edited June 2019 in Help


Dear all,


In a former version of Rapidminer it was possible to calculate with macros inside the "generate macro" operator (e.g. %{macro}+5). However, in the latest version it the latest version it says "must have arguments of type numerical".


Of course I could set back compatibility level but I was wondering whether there is another way of transformation as I like to stay on the latest version.


Best regards




<?xml version="1.0" encoding="UTF-8"?><process version="7.5.000">
<operator activated="true" class="process" compatibility="7.5.000" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="generate_data" compatibility="7.5.000" expanded="true" height="68" name="Generate Data" width="90" x="45" y="34"/>
<operator activated="true" class="extract_macro" compatibility="7.5.000" expanded="true" height="68" name="Extract Macro" width="90" x="179" y="34">
<parameter key="macro" value="last"/>
<list key="additional_macros"/>
<operator activated="true" class="generate_macro" compatibility="7.5.000" expanded="true" height="82" name="Generate Macro" width="90" x="313" y="34">
<list key="function_descriptions">
<parameter key="first" value="%{last}-9"/>
<operator activated="true" class="filter_example_range" compatibility="7.5.000" expanded="true" height="82" name="Filter Example Range" width="90" x="447" y="34">
<parameter key="first_example" value="%{first}"/>
<parameter key="last_example" value="%{last}"/>
<connect from_op="Generate Data" from_port="output" to_op="Extract Macro" to_port="example set"/>
<connect from_op="Extract Macro" from_port="example set" to_op="Generate Macro" to_port="through 1"/>
<connect from_op="Generate Macro" from_port="through 1" to_op="Filter Example Range" to_port="example set input"/>
<connect from_op="Filter Example Range" 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"/>

Best Answer

  • Options
    MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,525 RM Data Scientist
    Solution Accepted



    have a look at the eval function. this should do the trick.



    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany


  • Options
    qwertz2qwertz2 Member Posts: 49 Guru

    Thanks, that worked out well :)

Sign In or Register to comment.