Scidb sampling operator


#1

Is there any sampling operator in SciDB which we can use to sample the data points satisfying certain condition.
Currently I can only find filter operator when doing sampling, for example, filter(SOME_ARRAY, index%3=0). I wonder if there is some operator more efficient to accomplish this task…


#2

Take a look at bernoulli:

iquery -aq "op_count(variant)"
{i} count
{0} 743860

$ iquery -aq "op_count(bernoulli(variant,0.1))"
{i} count
{0} 75200

$ iquery -aq "op_count(bernoulli(variant,0.1))"
{i} count
{0} 72409

$ iquery -aq "op_count(bernoulli(variant,0.1))"
{i} count
{0} 74638


$ iquery -aq "op_count(bernoulli(variant,0.01))"
{i} count
{0} 7234

$ iquery -aq "op_count(bernoulli(variant,0.01))"
{i} count
{0} 7522

$ iquery -aq "op_count(bernoulli(variant,0.01))"
{i} count
{0} 7218

#3

@impanyu here is the documentation for bernoulli operator
https://paradigm4.atlassian.net/wiki/spaces/ESD169/pages/50856254/bernoulli