special Transpose after processing documents from text processing

virgilavirgila Member Posts: 1 Contributor I
edited July 2019 in Help
Hello Miners. I have a basic problem easy in the head but complicated to do for a new person on rapid miner.
I did processing documents on excel file and I obtain this kind of exemple set:

But Now I want to obtain a table like this:
Adn I don't know how. Please Help


  • Options
    awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458 Unicorn
    Hello virgila,

    De-Pivot is a possible solution. A bit mind-numbing; I find trial and error is the only way to get it to work.

    Here's an example for you to trial and error with.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.013">
      <operator activated="true" class="process" compatibility="5.3.013" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="generate_data_user_specification" compatibility="5.3.013" expanded="true" height="60" name="Generate Data by User Specification" width="90" x="45" y="30">
            <list key="attribute_values">
              <parameter key="file1" value="0"/>
              <parameter key="file2" value="1"/>
              <parameter key="word" value="&quot;word1&quot;"/>
            <list key="set_additional_roles"/>
          <operator activated="true" class="generate_data_user_specification" compatibility="5.3.013" expanded="true" height="60" name="Generate Data by User Specification (2)" width="90" x="45" y="120">
            <list key="attribute_values">
              <parameter key="file1" value="1"/>
              <parameter key="file2" value="0"/>
              <parameter key="word" value="&quot;word2&quot;"/>
            <list key="set_additional_roles"/>
          <operator activated="true" class="append" compatibility="5.3.013" expanded="true" height="94" name="Append" width="90" x="179" y="30"/>
          <operator activated="true" class="de_pivot" compatibility="5.3.013" expanded="true" height="76" name="De-Pivot" width="90" x="313" y="30">
            <list key="attribute_name">
              <parameter key="count" value="file.*"/>
            <parameter key="index_attribute" value="label1"/>
            <parameter key="create_nominal_index" value="true"/>
          <operator activated="true" class="filter_examples" compatibility="5.3.013" expanded="true" height="76" name="Filter Examples" width="90" x="313" y="120">
            <parameter key="condition_class" value="attribute_value_filter"/>
            <parameter key="parameter_string" value="count=0"/>
            <parameter key="invert_filter" value="true"/>
          <operator activated="true" class="select_attributes" compatibility="5.3.013" expanded="true" height="76" name="Select Attributes" width="90" x="447" y="120">
            <parameter key="attribute_filter_type" value="subset"/>
            <parameter key="attributes" value="|count"/>
            <parameter key="invert_selection" value="true"/>
          <operator activated="true" class="rename" compatibility="5.3.013" expanded="true" height="76" name="Rename" width="90" x="581" y="120">
            <parameter key="old_name" value="label1"/>
            <parameter key="new_name" value="files"/>
            <list key="rename_additional_attributes">
              <parameter key="word" value="words"/>
          <connect from_op="Generate Data by User Specification" from_port="output" to_op="Append" to_port="example set 1"/>
          <connect from_op="Generate Data by User Specification (2)" from_port="output" to_op="Append" to_port="example set 2"/>
          <connect from_op="Append" from_port="merged set" to_op="De-Pivot" to_port="example set input"/>
          <connect from_op="De-Pivot" from_port="example set output" to_op="Filter Examples" to_port="example set input"/>
          <connect from_op="De-Pivot" from_port="original" to_port="result 2"/>
          <connect from_op="Filter Examples" from_port="example set output" to_op="Select Attributes" to_port="example set input"/>
          <connect from_op="Select Attributes" from_port="example set output" to_op="Rename" to_port="example set input"/>
          <connect from_op="Rename" 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"/>
          <portSpacing port="sink_result 3" spacing="0"/>

Sign In or Register to comment.