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.

adding values from dataset 1 into dataset 2 in the same row

ferran1977ferran1977 Member Posts: 2 Contributor I
edited November 2018 in Help
dear all,

i am new in rapid miner. i am just trying to do a simple task bt i can't.

i am almost there, it is a small trick i do not know. please help!!!!!!!!!

i would like to fusion two csv datasets. on one side i got one data set containing values from an electroencephalogram.

date      time              image        val1  val2    val3 ...
2021 , 155636686 , img01.png,  10 , 10 , 1305629 , 160891 , 209449 , 30393 , 132207 , 27711 , 30756 , 5792

on the other dataset correlation values

img03.png , very happy
img03.png , arousal neutral
img03.png , quite dominant

i set up img. as an id in both datasets. however, i cannot use joint. i can use union, but is returning;

1 img01.png 10 10 1305629 160891 209449 30393 132207 27711 30756 5792 0 0 0
2 img01.png 54 91 936307 198711 17979 61573 82244 48030 8795 3527 0 0 0
3 img01.png 69 74 1371359 32174 36113 10171 10202 9657 3451 1503 0 0 0
26 img01.png 38 51 1670065 62507 10651 12717 18505 4743 2156 986         0 0 0
27 img01.png 24 37 1022000 65582 5830 12522 12412 12027 1740 3426 0 0 0
28 img01.png 47 40 1212223 144678 19996 24826 18910 19978 6012 3635 0 0 0
29 img01.png 61 37 1581921 51988 10438 29874 24858 23725 3664 3593 0 0 0
30 img01.png 80 48 487892 42078 13074 963         3053 1516 644         326       0 0 0
77 img01.png 0 0 0         0         0         0         0         0         0         0       2 15 25

it is almost what i need, but i would like to find the way to add the values from dataset 2 (2,15, 25) into every row from dataset 1.
this way i wuold be able to generate a single file with all the parametrers i need.


thank you


xml code



<?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">
    <parameter key="logverbosity" value="all"/>
    <process expanded="true" height="476" width="685">
      <operator activated="true" class="retrieve" compatibility="5.2.008" expanded="true" height="60" name="Retrieve" width="90" x="45" y="75">
        <parameter key="repository_entry" value="//MyRepository/pos"/>
      </operator>
      <operator activated="true" class="rename" compatibility="5.2.008" expanded="true" height="76" name="Rename" width="90" x="179" y="75">
        <parameter key="old_name" value="att3"/>
        <parameter key="new_name" value="id"/>
        <list key="rename_additional_attributes">
          <parameter key="att4" value="attention"/>
          <parameter key="att5" value="meditation"/>
          <parameter key="att6" value="delta"/>
          <parameter key="att7" value="theta"/>
          <parameter key="att8" value="l alpha"/>
          <parameter key="att9" value="h alpha"/>
          <parameter key="att10" value="l beta"/>
          <parameter key="att11" value="h beta"/>
          <parameter key="att12" value="l gamma"/>
          <parameter key="att13" value="h gamma"/>
        </list>
      </operator>
      <operator activated="true" class="set_role" compatibility="5.2.008" expanded="true" height="76" name="Set Role" width="90" x="313" y="75">
        <parameter key="name" value="id"/>
        <parameter key="target_role" value="id"/>
        <list key="set_additional_roles">
          <parameter key="attention" value="regular"/>
          <parameter key="meditation" value="regular"/>
          <parameter key="delta" value="regular"/>
          <parameter key="theta" value="regular"/>
          <parameter key="l alpha" value="regular"/>
          <parameter key="h alpha" value="regular"/>
          <parameter key="l beta" value="regular"/>
          <parameter key="h beta" value="regular"/>
          <parameter key="l gamma" value="regular"/>
          <parameter key="h gamma" value="regular"/>
        </list>
      </operator>
      <operator activated="true" class="retrieve" compatibility="5.2.008" expanded="true" height="60" name="Retrieve (2)" width="90" x="45" y="165">
        <parameter key="repository_entry" value="emo number"/>
      </operator>
      <operator activated="true" class="rename" compatibility="5.2.008" expanded="true" height="76" name="Rename (2)" width="90" x="179" y="165">
        <parameter key="old_name" value="att1"/>
        <parameter key="new_name" value="id"/>
        <list key="rename_additional_attributes">
          <parameter key="att2" value="happiness"/>
          <parameter key="att3" value="excitement"/>
          <parameter key="att4" value="dominance"/>
        </list>
      </operator>
      <operator activated="true" class="set_role" compatibility="5.2.008" expanded="true" height="76" name="Set Role (2)" width="90" x="313" y="165">
        <parameter key="name" value="id"/>
        <parameter key="target_role" value="id"/>
        <list key="set_additional_roles">
          <parameter key="happiness" value="regular"/>
          <parameter key="excitement" value="regular"/>
          <parameter key="dominance" value="regular"/>
        </list>
      </operator>
      <operator activated="true" class="union" compatibility="5.2.008" expanded="true" height="76" name="Union" width="90" x="476" y="105"/>
      <operator activated="true" class="replace_missing_values" compatibility="5.2.008" expanded="true" height="94" name="Replace Missing Values" width="90" x="447" y="300">
        <parameter key="attribute" value="happiness"/>
        <parameter key="default" value="value"/>
        <list key="columns"/>
        <parameter key="replenishment_value" value="0"/>
      </operator>
      <connect from_op="Retrieve" from_port="output" to_op="Rename" to_port="example set input"/>
      <connect from_op="Rename" from_port="example set output" to_op="Set Role" to_port="example set input"/>
      <connect from_op="Set Role" from_port="example set output" to_op="Union" to_port="example set 1"/>
      <connect from_op="Retrieve (2)" from_port="output" to_op="Rename (2)" to_port="example set input"/>
      <connect from_op="Rename (2)" from_port="example set output" to_op="Set Role (2)" to_port="example set input"/>
      <connect from_op="Set Role (2)" from_port="example set output" to_op="Union" to_port="example set 2"/>
      <connect from_op="Union" from_port="union" to_op="Replace Missing Values" to_port="example set input"/>
      <connect from_op="Replace Missing Values" from_port="example set output" to_port="result 1"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="180"/>
      <portSpacing port="sink_result 2" spacing="0"/>
    </process>
  </operator>
</process>

Answers

Sign In or Register to comment.