Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

name: op-group-quantile
description: Partition records into N equal-population quantile buckets (Q1..Q4 / D1..D10 / P1..P100).
kind: operator
category: GROUP
operator: GROUP_QUANTILE
type: reference
applies_to: process, compose, predict
examples_tags: [distribution-shape, buffered-pipeline]

Use when

Splits the rows into equal-sized groups by rank of a number, such as quartiles or deciles of spend, to compare top and bottom.

Questions it answers:

  • How do the top 25% of spenders differ from the bottom 25%?
  • What is the average basket in each decile of customer value?

Use something else:

  • GROUP_RANGE when you want bands of a fixed width, such as every 10 years of age.

Params

NameTypeDefaultDescription
intervalint4Number of buckets; set on Group.Interval. 4 (quartiles), 10 (deciles), 100 (percentiles).

Weight (both kinds; "weight": null opts out): buckets cut at the weighted order statistics (the weighted-percentile rule; probability rescaled to the row count). A heavy row spanning a cut lands whole in the higher bucket; count / total_n stay raw rows.

Inputs

ParamAccepted field types
Fieldnumeric: u4/u8/u16/u32/u64, f32/f64 (no decimal128)

Output

Bucket label per row (Qk / Dk / Pk).

Components

Universal floor {total_n, n_null} plus operator-specific:

KeyTypeNotes
n_quantilesintEqual-population buckets
methodstringInterpolation ("linear")
edges[]float64Sorted cutpoints
buckets[]bucket{key, low, high, count}
  • Mergeability: None — BufferedComponents=true; needs sorted full input
  • Streaming: Streamable=false — terminal-only.

Gotchas

  • Forces buffered execution — disables fused crosstab.
  • Rejects categorical/decimal128 at construction.
  • Group.Include not honoured — buckets are derived ranks.

See