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

How to use ExampleFilter or ExampleRangeFilter

amyamy Member Posts: 16 Maven
edited November 2018 in Help
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.

Answers

  • steffensteffen Member Posts: 347 Maven
    Hello amy

    For this case, you need to double the ExampleSet and apply ExampleFilter twice.
    Example:
    <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>

    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

  • amyamy Member Posts: 16 Maven
    Hi Steffen,
    Thank you very much. Especially the idea about ExampleSet and ExampleTable.

    Regards

    Amy
Sign In or Register to comment.