Pages: [1]
  Print  
Author Topic: split (select) on Label  (Read 415 times)
nwlongb
Newbie
*
Posts: 1


« on: September 24, 2010, 05:33:25 AM »

Is there a way to select a portion of a data set through the label identifiers?  I have image data imported and running through a classification chain, but I can only subset the data through the use of "Select attribute" (such as image band), which is very useful, but I would also like to select on labels (in my case - class type).  Any suggestion appreciated.

I am a new user to RapidMiner.  So the answer may be as simple as an operator name.  To cover my butt, I have searched both these forums on the web via google for the answer.  Thanks for the help.
Logged
haddock
Hero Member
*****
Posts: 837



WWW
« Reply #1 on: September 24, 2010, 09:15:00 AM »

Hi there,

Quote
To cover my butt, I have searched both these forums on the web via google for the answer

Definitely encourages answers!

You can actually do this just with the filter operator, using the attribute_value_filter  Shocked Which, I agree, is not immediately intuitive.
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.0">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="5.0.10" expanded="true" name="Process">
    <process expanded="true" height="161" width="346">
      <operator activated="true" class="generate_data" compatibility="5.0.10" expanded="true" height="60" name="Generate Data" width="90" x="59" y="89"/>
      <operator activated="true" class="filter_examples" compatibility="5.0.10" expanded="true" height="76" name="Filter Examples" width="90" x="246" y="75">
        <parameter key="condition_class" value="attribute_value_filter"/>
        <parameter key="parameter_string" value="label&lt;0.5"/>
      </operator>
      <connect from_op="Generate Data" from_port="output" to_op="Filter Examples" to_port="example set input"/>
      <connect from_op="Filter Examples" 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>
Logged

Where is the wisdom we have lost in knowledge?
Where is the knowledge we have lost in information?

T.S.Eliot ~ Choruses from the Rock 1934
Pages: [1]
  Print  
 
Jump to: