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
Deleting the Examples according to a condition
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
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
0
Answers
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
Is there a better way to do the above?
Thanks,
Shubha
Cheers,
Ingo