Quantile Transform
The quantile transform ≥ 5.7 calculates empirical quantile values for an input data stream. If a groupby parameter is provided, quantiles are estimated separately per group. Among other uses, the quantile transform is useful for creating quantile-quantile (Q-Q) plots.
Transform Parameters
| Property | Type | Description |
|---|---|---|
| field | Field | Required. The data field for which to perform quantile estimation. |
| groupby | Field[ ] | The data fields to group by. If not specified, a single group containing all data objects will be used. |
| probs | Number[ ] | An array of probabilities in the range (0, 1) for which to compute quantile values. If not specified, the step parameter will be used. |
| step | Number | A probability step size (default 0.01) for sampling quantile values. All values from one-half the step size up to 1 (exclusive) will be sampled. This parameter is only used if the probs parameter is not provided. |
| as | String[ ] | The output fields for the probability and quantile value. The default is ["prob", "value"]. |
Usage
This example computes the quartile boundaries for the input data field value:
{"type": "quantile", "field": "value", "probs": [0.25, 0.50, 0.75]}
This example computes 20 equally-spaced quantiles (from 0.025 to 0.975):
{"type": "quantile", "field": "value", "step": 0.05}
For more, see the quantile-quantile plot example.