Sampling

hi knimers

i want to implement manual sampling approach it's name is Balanced Stratified Sampling

Balanced stratified sampling is selecting the samples from m strata, but of equal size. If there are minority
or majority classes then over-sampling or under-sampling respectively need to be performed as
required  based  on  the  distribution  of  the  classes.

the  first  option  of  balancing  is through ignoring the minority classes for the ratios above 1:100. As the response variable is of multivariate  in  nature,  ignoring  the  minority  class  leads  to  minimal  error. 

The second  method adopted  is to take equal size of samples from each strata by reducing the stratum to p<m, such that p changing as the size of the sub-sample changes gradually from 500 to 30000.

The balancing criteria has been maintained in an excel file with the required size(i.e from 500–
30000)  and  that  file  has  been  given  as  input  for  the  already  built-in  stratified  model.

anyone can help me???

thank you very much

 

Hi Hoosein,

we do have the Equal Size Sampling node, which generates such a Balanced Sampling. But if you want to ensure the exact methodology. You would need to write your own node.

Best, Iris

thank you

how can i set sample size in equal size sampling node?

and  how can i write my own node and code?i do not know

 

There is no sample size in the equal size sampling node.

You would first apply the eqal size sampling node and than the "Sampling" node using Stratified Sampling. there you can insert the sample size.

We do have a special section here: http://tech.knime.org/developer-guide which shows you how to program your own node

Best, Iris