RapidMiner

join operator problem...

Experienced User

join operator problem...

hi,

I used join operator to join 4 outlier detection columns to my dataset, however, only 2 are showing up, here is my code:

<?xml version="1.0" encoding="UTF-8"?><process version="7.2.001">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="6.0.002" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="retrieve" compatibility="7.2.001" expanded="true" height="68" name="Retrieve Master3Klassen_nominal" width="90" x="45" y="34">
        <parameter key="repository_entry" value="//Marc/data/Master3Klassen_nominal"/>
      </operator>
      <operator activated="true" class="generate_id" compatibility="7.2.001" expanded="true" height="82" name="Generate ID" width="90" x="112" y="238"/>
      <operator activated="true" class="normalize" compatibility="7.2.001" expanded="true" height="103" name="Normalize" width="90" x="246" y="187"/>
      <operator activated="true" class="multiply" compatibility="7.2.001" expanded="true" height="145" name="Multiply" width="90" x="380" y="85"/>
      <operator activated="true" class="anomalydetection:One-Class LIBSVM Anomaly Score" compatibility="2.3.002" expanded="true" height="82" name="One-Class LIBSVM Anomaly Score" width="90" x="313" y="340"/>
      <operator activated="true" class="anomalydetection:k-NN Global Anomaly Score" compatibility="2.3.002" expanded="true" height="103" name="k-NN Global Anomaly Score (2)" width="90" x="715" y="85">
        <parameter key="k" value="1"/>
        <parameter key="use k-th neighbor distance only (no average)" value="true"/>
        <parameter key="measure_types" value="NumericalMeasures"/>
        <parameter key="numerical_measure" value="CamberraDistance"/>
        <parameter key="parallelize evaluation process" value="true"/>
      </operator>
      <operator activated="true" class="rename" compatibility="7.2.001" expanded="true" height="82" name="Rename" width="90" x="916" y="85">
        <parameter key="old_name" value="outlier"/>
        <parameter key="new_name" value="k-NN_outlier"/>
        <list key="rename_additional_attributes"/>
      </operator>
      <operator activated="true" class="rename" compatibility="7.2.001" expanded="true" height="82" name="Rename (4)" width="90" x="447" y="391">
        <parameter key="old_name" value="outlier"/>
        <parameter key="new_name" value="LIBSVM_outlier"/>
        <list key="rename_additional_attributes"/>
      </operator>
      <operator activated="false" class="set_role" compatibility="7.2.001" expanded="true" height="82" name="Set Role" width="90" x="1117" y="85">
        <parameter key="attribute_name" value="k-NN_outlier"/>
        <list key="set_additional_roles"/>
      </operator>
      <operator activated="true" class="set_role" compatibility="7.2.001" expanded="true" height="82" name="Set Role (3)" width="90" x="581" y="391">
        <parameter key="attribute_name" value="LIBSVM_outlier"/>
        <list key="set_additional_roles"/>
      </operator>
      <operator activated="true" class="anomalydetection:Local Outlier Factor (LOF)" compatibility="2.3.002" expanded="true" height="103" name="Local Outlier Factor (LOF)" width="90" x="581" y="238">
        <parameter key="k_min (MinPtsLB)" value="1"/>
        <parameter key="k_max (MinPtsUB)" value="30"/>
        <parameter key="measure_types" value="NumericalMeasures"/>
        <parameter key="numerical_measure" value="CamberraDistance"/>
        <parameter key="parallelize evaluation process" value="true"/>
      </operator>
      <operator activated="true" class="anomalydetection:Connectivity-Based Outlier Factor (COF)" compatibility="2.3.002" expanded="true" height="103" name="Connectivity-Based Outlier Factor (COF)" width="90" x="313" y="544">
        <parameter key="k" value="1"/>
        <parameter key="measure_types" value="NumericalMeasures"/>
        <parameter key="numerical_measure" value="CamberraDistance"/>
        <parameter key="parallelize evaluation process" value="true"/>
      </operator>
      <operator activated="true" class="rename" compatibility="7.2.001" expanded="true" height="82" name="Rename (2)" width="90" x="782" y="187">
        <parameter key="old_name" value="outlier"/>
        <parameter key="new_name" value="LOF_outlier"/>
        <list key="rename_additional_attributes"/>
      </operator>
      <operator activated="true" class="rename" compatibility="7.2.001" expanded="true" height="82" name="Rename (3)" width="90" x="447" y="544">
        <parameter key="old_name" value="outlier"/>
        <parameter key="new_name" value="COF_outlier"/>
        <list key="rename_additional_attributes"/>
      </operator>
      <operator activated="true" class="set_role" compatibility="7.2.001" expanded="true" height="82" name="Set Role (2)" width="90" x="983" y="187">
        <parameter key="attribute_name" value="LOF_outlier"/>
        <list key="set_additional_roles"/>
      </operator>
      <operator activated="true" class="join" compatibility="7.2.001" expanded="true" height="82" name="Join" width="90" x="1184" y="238">
        <parameter key="remove_double_attributes" value="false"/>
        <list key="key_attributes"/>
        <parameter key="keep_both_join_attributes" value="true"/>
      </operator>
      <operator activated="true" class="set_role" compatibility="7.2.001" expanded="true" height="82" name="Set Role (4)" width="90" x="581" y="544">
        <parameter key="attribute_name" value="COF_outlier"/>
        <list key="set_additional_roles"/>
      </operator>
      <operator activated="true" class="join" compatibility="7.2.001" expanded="true" height="82" name="Join (2)" width="90" x="983" y="493">
        <parameter key="remove_double_attributes" value="false"/>
        <list key="key_attributes"/>
        <parameter key="keep_both_join_attributes" value="true"/>
      </operator>
      <operator activated="true" class="join" compatibility="7.2.001" expanded="true" height="82" name="Join (3)" width="90" x="1117" y="391">
        <parameter key="remove_double_attributes" value="false"/>
        <list key="key_attributes"/>
        <parameter key="keep_both_join_attributes" value="true"/>
      </operator>
      <connect from_op="Retrieve Master3Klassen_nominal" from_port="output" to_op="Generate ID" to_port="example set input"/>
      <connect from_op="Generate ID" from_port="example set output" to_op="Normalize" to_port="example set input"/>
      <connect from_op="Normalize" from_port="example set output" to_op="Multiply" to_port="input"/>
      <connect from_op="Multiply" from_port="output 1" to_op="Local Outlier Factor (LOF)" to_port="example set"/>
      <connect from_op="Multiply" from_port="output 2" to_op="One-Class LIBSVM Anomaly Score" to_port="example set"/>
      <connect from_op="Multiply" from_port="output 3" to_op="k-NN Global Anomaly Score (2)" to_port="example set"/>
      <connect from_op="Multiply" from_port="output 4" to_op="Connectivity-Based Outlier Factor (COF)" to_port="example set"/>
      <connect from_op="One-Class LIBSVM Anomaly Score" from_port="example set" to_op="Rename (4)" to_port="example set input"/>
      <connect from_op="k-NN Global Anomaly Score (2)" from_port="example set" to_op="Rename" to_port="example set input"/>
      <connect from_op="k-NN Global Anomaly Score (2)" from_port="model" to_port="result 1"/>
      <connect from_op="Rename" from_port="example set output" to_op="Join" to_port="right"/>
      <connect from_op="Rename (4)" from_port="example set output" to_op="Set Role (3)" to_port="example set input"/>
      <connect from_op="Set Role (3)" from_port="example set output" to_op="Join (2)" to_port="left"/>
      <connect from_op="Local Outlier Factor (LOF)" from_port="example set" to_op="Rename (2)" to_port="example set input"/>
      <connect from_op="Connectivity-Based Outlier Factor (COF)" from_port="example set" to_op="Rename (3)" 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="Rename (3)" from_port="example set output" to_op="Set Role (4)" to_port="example set input"/>
      <connect from_op="Set Role (2)" from_port="example set output" to_op="Join" to_port="left"/>
      <connect from_op="Join" from_port="join" to_op="Join (3)" to_port="left"/>
      <connect from_op="Set Role (4)" from_port="example set output" to_op="Join (2)" to_port="right"/>
      <connect from_op="Join (2)" from_port="join" to_op="Join (3)" to_port="right"/>
      <connect from_op="Join (3)" from_port="join" to_port="result 2"/>
      <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"/>
    </process>
  </operator>
</process>

I could not resolve what the problem is..

1 REPLY
Highlighted
Frequent User

Re: join operator problem...

Hey, are you sure the attributes are gone? They should still be in the data (but they may change position, i.e., they are not necessarily at the top/left of the data set.

 

Cheers,

Marius