🥳 RAPIDMINER 9.9 IS OUT!!! 🥳

The updates in 9.9 power advanced use cases and offer productivity enhancements for users who prefer to code.

CLICK HERE TO DOWNLOAD

Generate attribute is taking wrong macro value

Himanshu_PantHimanshu_Pant Member Posts: 30 Contributor I
I have declared a macro b =5 but the generate attribute operator is taking it as 2. I have added xml, please help





<?xml version="1.0" encoding="UTF-8"?><process version="9.9.000">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="9.9.000" expanded="true" name="Process">
    <parameter key="logverbosity" value="init"/>
    <parameter key="random_seed" value="2001"/>
    <parameter key="send_mail" value="never"/>
    <parameter key="notification_email" value=""/>
    <parameter key="process_duration_for_mail" value="30"/>
    <parameter key="encoding" value="SYSTEM"/>
    <process expanded="true">
      <operator activated="true" class="set_macros" compatibility="9.9.000" expanded="true" height="68" name="Set Macros" width="90" x="112" y="187">
        <list key="macros">
          <parameter key="abcd" value="2"/>
          <parameter key="xyzs" value="5"/>
          <parameter key="c" value="1"/>
        </list>
      </operator>
      <operator activated="true" class="retrieve" compatibility="9.9.000" expanded="true" height="68" name="Retrieve dates" width="90" x="45" y="34">
        <parameter key="repository_entry" value="//sdbc_rapid_miner/processes/dates"/>
      </operator>
      <operator activated="true" class="nominal_to_date" compatibility="9.9.000" expanded="true" height="82" name="Nominal to Date (3)" width="90" x="313" y="34">
        <parameter key="attribute_name" value="Dates"/>
        <parameter key="date_type" value="date_time"/>
        <parameter key="date_format" value="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"/>
        <parameter key="time_zone" value="SYSTEM"/>
        <parameter key="locale" value="English (United States)"/>
        <parameter key="keep_old_attribute" value="true"/>
      </operator>
      <operator activated="true" class="generate_attributes" compatibility="9.9.000" expanded="true" height="82" name="Generate Attributes (3)" width="90" x="581" y="34">
        <list key="function_descriptions">
          <parameter key="Event DateTime_adjusted" value="-eval(%{b})"/>
        </list>
        <parameter key="keep_all" value="true"/>
      </operator>
      <connect from_op="Retrieve dates" from_port="output" to_op="Nominal to Date (3)" to_port="example set input"/>
      <connect from_op="Nominal to Date (3)" from_port="example set output" to_op="Generate Attributes (3)" to_port="example set input"/>
      <connect from_op="Generate Attributes (3)" 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>

Best Answer

  • mschmitzmschmitz Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 2,982  RM Data Scientist
    edited June 9 Solution Accepted
    Hi,
    be careful with single letter macros, there are some predefined macros. a is one of them.

    Edit: The full list is here: https://docs.rapidminer.com/latest/studio/getting-started/macros.html . The dangerous ones are a,b,c and n.


    Best,
    Martin

    - Head of Data Science Services at RapidMiner -
    Dortmund, Germany
    Himanshu_Pant

Answers

Sign In or Register to comment.