Pages: [1]
  Print  
Author Topic: Deleting the Examples according to a condition  (Read 1114 times)
Shubha
Full Member
***
Posts: 141


« on: March 20, 2009, 11:22:35 AM »

Hi,

I have an example dataset, with 10 variables. Among them, i have two nominal variables, 'cluster' and 'cluster_from_ES2', both taking the values, 'cluster_0', 'cluster_1' and 'cluster_2'. Now, i want to delete the examples (rows), where cluster!=cluster_from_ES2. i.e., I want to retain only the rows when the value of 'cluster' is equal to 'cluster_from_ES2'. How do i do this?

Thanks,
Shubha
Logged
Shubha
Full Member
***
Posts: 141


« Reply #1 on: March 20, 2009, 12:53:21 PM »

Hi,

I used two operators 'AttributeConstruction' and 'ExampleFilter' to do the above task as below:

    <operator name="AttributeConstruction" class="AttributeConstruction">
        <list key="function_descriptions">
          <parameter key="flag"   value="if(cluster==cluster_from_ES2,1,0)"/>
        </list>
    </operator>
    <operator name="ExampleFilter" class="ExampleFilter">
        <parameter key="condition_class"   value="attribute_value_filter"/>
        <parameter key="parameter_string"   value="flag=1"/>
    </operator>

But i dont want to use two operators here. I strongly feel that only "ExampleFilter" should take care of the whole. Can I accomplish this task only using 'ExampleFilter'?

Thanks,
Shubha
Logged
Shubha
Full Member
***
Posts: 141


« Reply #2 on: March 23, 2009, 12:36:44 PM »

Hi,

Is there a better way to do the above?

Thanks,
Shubha
Logged
Ingo Mierswa
Administrator
Hero Member
*****
Posts: 1226



WWW
« Reply #3 on: March 23, 2009, 12:45:32 PM »

No.

Cheers,
Ingo
Logged

Did you try our new Marketplace? Upload or download new Extensions, add comments, and organize your operators. Have a look at  http://marketplace.rapid-i.com
Pages: [1]
  Print  
 
Jump to: