Pages: [1]
  Print  
Author Topic: How to use ExampleFilter or ExampleRangeFilter  (Read 1614 times)
amy
Newbie
*
Posts: 16


« on: October 06, 2008, 12:39:34 PM »

Hi there,
I have an ExampleSet eset now and also I have selected some examples out of it such as e1, e2, e3, e4, e5.
How can I separate eset into two parts, one ExampleSet just includes  e1, e2, e3, e4, e5, and the other has the left in it?
Should I use ExampleFilter? I have looked at it. But I don't know how to use it.
I use RapidMiner in java not with the GUI interface.
Another question is if I have a double[] which has the same structure as e1, e2 etc., how can I add the double[] to eset.
Thanks a lot.
Logged
steffen
Sr. Member
****
Posts: 376



« Reply #1 on: October 07, 2008, 08:56:24 AM »

Hello amy

For this case, you need to double the ExampleSet and apply ExampleFilter twice.
Example:
Code:
<operator name="Root" class="Process" expanded="yes">
    <operator name="ExampleSource" class="ExampleSource">
        <parameter key="attributes" value="iris.aml"/>
    </operator>
    <operator name="IOMultiplier" class="IOMultiplier">
        <parameter key="io_object" value="ExampleSet"/>
    </operator>
    <operator name="ExampleFilter" class="ExampleFilter">
        <parameter key="condition_class" value="attribute_value_filter"/>
        <parameter key="parameter_string" value="a1&gt;5"/>
    </operator>
    <operator name="IOSelector" class="IOSelector">
        <parameter key="io_object" value="ExampleSet"/>
        <parameter key="select_which" value="2"/>
    </operator>
    <operator name="ExampleFilter (2)" class="ExampleFilter">
        <parameter key="condition_class" value="attribute_value_filter"/>
        <parameter key="invert_filter" value="true"/>
        <parameter key="parameter_string" value="a1&gt;5"/>
    </operator>
</operator>

Quote
Another question is if I have a double[] which has the same structure as e1, e2 etc., how can I add the double[] to eset.
I suggest this: Create an ExampleSet representing your double[] and then apply the ExampleSetMerge-Operator. 
In case you think this is complicated: The inner structure of ExampleSet named ExampleTable, which stores the data (note that ExampleSet is just a view on ExampleTable), is not meant to be changed easily (e.g. by adding data). This seems to be a disadvantage, but in fact this is one the reasons why RapidMiner is fast.

hope this was helpful,

Steffen

Logged

"I want to make computers do what I mean instead of what I say"
Read The Fantastic Manual
amy
Newbie
*
Posts: 16


« Reply #2 on: October 07, 2008, 11:17:10 AM »

Hi Steffen,
Thank you very much. Especially the idea about ExampleSet and ExampleTable.

Regards

Amy
Logged
Pages: [1]
  Print  
 
Jump to: