"filter examples having values from an interval"
Answers
-
Hi,
you can use this process:
You just need to specify the range in the Generate Attribute operator, rename the column from "Test" to whatever you need and you're good to go
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.1.008">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.1.008" expanded="true" name="Process">
<process expanded="true" height="649" width="950">
<operator activated="true" class="retrieve" compatibility="5.1.008" expanded="true" height="60" name="Retrieve" width="90" x="45" y="30">
<parameter key="repository_entry" value="//LocalRepository/Processes/Forum/Data/FilterInterval"/>
</operator>
<operator activated="true" class="generate_attributes" compatibility="5.1.008" expanded="true" height="76" name="Generate Attributes" width="90" x="179" y="30">
<list key="function_descriptions">
<parameter key="to_remove" value="if (Test<1 || Test>4, true, false)"/>
</list>
</operator>
<operator activated="true" class="filter_examples" compatibility="5.1.008" expanded="true" height="76" name="Filter Examples" width="90" x="313" y="30">
<parameter key="condition_class" value="attribute_value_filter"/>
<parameter key="parameter_string" value="to_remove=false"/>
</operator>
<operator activated="true" class="select_attributes" compatibility="5.1.008" expanded="true" height="76" name="Select Attributes" width="90" x="447" y="30">
<parameter key="attribute_filter_type" value="single"/>
<parameter key="attribute" value="to_remove"/>
<parameter key="invert_selection" value="true"/>
</operator>
<connect from_op="Retrieve" from_port="output" to_op="Generate Attributes" to_port="example set input"/>
<connect from_op="Generate Attributes" from_port="example set output" to_op="Filter Examples" to_port="example set input"/>
<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_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
Regards,
Marco0 -
thank you Marco,
it works, BUT I had to convert nominal label of interest into numerical and after filtering back into nominal. This is really clumsy way to do something like value range
selection. :-\
Hope this will be implemented as part of a single operator e.g. filter examples including nominal list filtering or perl like script selection.
cheers0 -
Hi,
well it's always helpful to have a numerical value if you want to do range filtering
If you don't like the above process, you can do the same thing with the Execute Script operator, you will just need to write your own groovy script.
Regards,
Marco0 -
groovy! ;D0