The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 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] Problems Pivoting

rosanarosana Member Posts: 13 Contributor II
edited November 2018 in Help
Good afternoon,

I have a RM process which includes a PIVOT Operator. If I include a "breakpoint" in this operator it seems that pivot is well done (as I can see the Data), but the window in the "Process View" at the output of this Operator indicates Nr of Examples = 0... Why?? What should I do?

I include the code...
Thank you!!

BestRosana
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.2.008">
 <context>
   <input/>
   <output/>
   <macros/>
 </context>
 <operator activated="true" class="process" compatibility="5.2.008" expanded="true" name="Process">
   <process expanded="true" height="338" width="644">
     <operator activated="true" class="retrieve" compatibility="5.2.008" expanded="true" height="60" name="Retrieve (13)" width="90" x="45" y="120">
       <parameter key="repository_entry" value="../InputData/Agoust/PPI/ArcAnl_20120822031500"/>
     </operator>
     <operator activated="true" class="rename" compatibility="5.2.008" expanded="true" height="76" name="Rename (13)" width="90" x="179" y="120">
       <parameter key="old_name" value="att2"/>
       <parameter key="new_name" value="caID"/>
       <list key="rename_additional_attributes">
         <parameter key="att6" value="SysDate"/>
         <parameter key="att13" value="ucState"/>
       </list>
     </operator>
     <operator activated="true" class="nominal_to_date" compatibility="5.2.008" expanded="true" height="76" name="Nominal to Date (13)" width="90" x="313" y="120">
       <parameter key="attribute_name" value="SysDate"/>
       <parameter key="date_type" value="date_time"/>
       <parameter key="date_format" value="dd/mm/yy hh:mm"/>
     </operator>
     <operator activated="true" class="pivot" compatibility="5.2.008" expanded="true" height="76" name="Pivot" width="90" x="447" y="120">
       <parameter key="group_attribute" value="SysDate"/>
       <parameter key="index_attribute" value="caID"/>
       <parameter key="skip_constant_attributes" value="false"/>
     </operator>
     <connect from_op="Retrieve (13)" from_port="output" to_op="Rename (13)" to_port="example set input"/>
     <connect from_op="Rename (13)" from_port="example set output" to_op="Nominal to Date (13)" to_port="example set input"/>
     <connect from_op="Nominal to Date (13)" from_port="example set output" to_op="Pivot" to_port="example set input"/>
     <connect from_op="Pivot" 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>

Answers

  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    Hi Rosana,

    as far as I can see without having access to the data, the process looks fine. Did you set the breakpoint before or after the Pivot operator? Theoretically, the data cannot change between the output of the last operator and the process output.
    What do you see if you rightclick the "exa" output port of Pivot and select "Show Example Set Result"?

    All the best,
    Marius
  • rosanarosana Member Posts: 13 Contributor II
    Hi Marius!

    I set the breakpoint after the Pivot operator.

    If I select "Show Example Set Result" what I see is correct: number of examples and attributes OK... but if I just put the cursor on the "output port" (without clicking) it says "number os examples = 0"... Therefore the next operator (after the Pivot Op) has 0 examples as input..  ???

    [flash=200,200][/flash]

    Best, Rosana
  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    What counts after all is what comes out of the operator, not the metadata which you get when hovering the port. The  latter one is not always accurate, since it is estimated without actually executing the process. If you execute the process (with the output port of Pivot connected to the process output), the results should be fine.

    Best, Marius
  • rosanarosana Member Posts: 13 Contributor II
    Ok, thank you very much Marious!
    Best , Rosana
Sign In or Register to comment.