how can i set condition for statistic node out put?

hi.....

suppose i have uses statistic node and in occurnecs table i have some result which tell me how many records are in one class....now how i can set condition on that result?

for example if it is less than some value then oversample that class label or under sample it....

i really appreciate your help

The rule engine node can be used to set conditions or rules.

if you solely are interested in sampling ratios, try the Equal Sampling Size node which ensure an even balance of rows are picked from each class.

Or if you want an over represented class to remain over represented in the sampling then use the Row Sampling node and choose Stratified Sampling.

simon.

thanks simon

but the problem with equal sampling node is that when i have 100 recordes belong to class a,90 records to b and 2o to c,i takes 20 from each startum right?

but what if i want to over sample records belong to c  and take fifty of them....vice versa for undersampling

Ok,

best solution I can think of is:

use Group Loop Start node on class column. This will take each Class in turn.

Use Shuffle node to randomise the row order.

use maths node with the expression RowCount. This determines how many belong to Class.

use maths node with the expression RowIndex. This determines the Row Number.

use Rule Based Row Filter. You can then set up your desired expressions to determine how many you want to sample for the class. I.e. RowCount > 100 AND RowIndex < 20 => true. So in this case, if over 100 samples are in the class it will only pick 20 samples. 

Finally have a LoopEnd node.

simon.

thnaks for your response...

i think thats what i am looking for....

but i have trouble in configuring  the nodes could u please send me an wrokflow containig these nodes?

by the way i can not find maths node...

i really appreciate it

Unfortunately I don't have access to Knime right now to send a workflow.

the maths node I think is called Maths Formula node to be exact under the Misc category. 

If the node is not there then you need to add some extra node extensions from the Install New Software menu.

simon.

okkk....

thnaks a lot simon

here is a quick example I have knocked up fro you.

Simon.

thanks alot