Loading

bucketizer.percentile

bucketizer

Pushes onto the stack an AGGREGATOR which returns the N^th^ percentile of the values in the bucket.

The returned location and elevation are those of the chosen value or are interpolated in the same way the value is.

The percentile is computed according to the formulae in Hyndman, Rob & Fan, Yanan. (1996). Sample Quantiles in Statistical Packages. The American Statistician. Most used types are 1 when no interpolation is wanted and 7 when interpolation is wanted.

bucketizer.percentile is available since version 1.0.11.

Signatures

Examples

[ [ NEWGTS "GTS" RENAME 10 NaN NaN NaN 3.0 ADDVALUE 30 NaN NaN NaN 2.0 ADDVALUE 32 NaN NaN NaN 5.0 ADDVALUE 35 NaN NaN NaN 4.0 ADDVALUE 38 NaN NaN NaN 0.0 ADDVALUE 39 NaN NaN NaN 8.0 ADDVALUE 40 NaN NaN NaN 3.0 ADDVALUE //first bucket 41 NaN NaN NaN -100.0 ADDVALUE 42 NaN NaN NaN 8.0 ADDVALUE 43 NaN NaN NaN 9.0 ADDVALUE 43 NaN NaN NaN 9.0 ADDVALUE 49 NaN NaN NaN 8.0 ADDVALUE //second bucket ] 70.0 bucketizer.percentile //probability of being less than x is 70%. this bucketizer will returns x. 80 //last bucket 40 //bucket span 2 //bucket count ] BUCKETIZE