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

Choosing an Operator

Audience: anyone writing a request who knows the question but not the operator name.

This page maps common questions to operators. It is not the full list: every registered operator, with its params, accepted field types and streamability, is in the Operator catalog, in each operator’s skill (op-agg-count for AGG_COUNT, through pulse_skills_get) and in the manifest (pulse --json). Set-field operators are on Field Types → Sets.

Aggregators

You wantUse
Count, total, mean, extremesAGG_COUNT, AGG_SUM, AGG_AVERAGE, AGG_MIN, AGG_MAX
SpreadAGG_STDDEV, AGG_VARIANCE (population by default; params.ddof: 1 for the sample figure), AGG_RANGE (max − min)
ShapeAGG_SKEWNESS (g1) and AGG_KURTOSIS (excess g2), population moments
Median or a percentileAGG_MEDIAN, AGG_PERCENTILE; both buffer every value
Prediction errorAGG_MAE, AGG_RMSE, AGG_MAPE (a fraction; zero actuals are excluded and counted). field is the actual, params.prediction_field the prediction, typically an ATTR_REG_PREDICT column

Groupers

You wantUse
One group per categoryGROUP_CATEGORY
Fixed-width numeric binsGROUP_RANGE
Equal-population binsGROUP_QUANTILE
Named numeric bands (score bands, a train / holdout split)GROUP_NUMERIC_RANGES: inline {label, start, end} ranges or a registered range table (pulse_range_tables lists them); labels are unique within a set (PULSE_RANGE_DUPLICATE_LABEL)
Calendar periods or named date windowsGROUP_DATE, GROUP_DATE_RANGES

Windows

Windows run on the result rows, in each partition’s order (order_by).

You wantUse
The previous or next row’s valueWIN_LAG, WIN_LEAD
Change against an earlier rowWIN_DELTA (difference), WIN_PCT_CHANGE (fraction, 0.05 = 5%)
Position in the partitionWIN_ROW_NUMBER, WIN_RANK (gaps after ties), WIN_DENSE_RANK (no gaps)
Cumulative figuresWIN_RUNNING_SUM, WIN_RUNNING_AVG
SmoothingWIN_MOVING_AVG (a frame bounded at both ends), WIN_EWMA
Share of the partition, capture and gains curvesWIN_SHARE, WIN_LIFT (share of the field over share of a base column)
Carry-over, such as media adstockWIN_DISTRIBUTED_LAG

Features

You wantUse
Tame skew, add curvatureFEAT_LOG, FEAT_SQRT, FEAT_POLY
Encode a categorical as numbersFEAT_ONE_HOT (a column per level), FEAT_FREQUENCY_ENCODE (each level’s relative frequency; reads no target), FEAT_TARGET_ENCODE (the target’s smoothed mean; fit it on training rows only)
Bin, date parts, a split columnFEAT_BUCKETIZE, FEAT_DATE_FEATURES, FEAT_TRAIN_TEST_SPLIT

Statistical tests

QuestionUse
Do two groups differ in mean?TEST_T / TEST_WELCH (Welch t), TEST_Z_TWO_SAMPLE (large samples, normal tail), TEST_MANN_WHITNEY_U (ranks)
Do paired measurements differ? (field and field2 on one row)TEST_PAIRED_T, TEST_WILCOXON_SR (signed ranks)
Do k groups differ in mean?TEST_ANOVA_F, TEST_ANOVA_WELCH (unequal variances), TEST_KRUSKAL_WALLIS (ranks), then TEST_TUKEY_HSD for the pairs (k ≥ 3, else PULSE_TEST_TUKEY_REQUIRES_K_GE_3); TEST_ANOVA_RM for repeated measures
Do groups differ in variance?TEST_BROWN_FORSYTHE
Are two categorical fields associated?TEST_CHISQ; TEST_FISHER_EXACT for a 2 × 2 table with small counts (a larger table is PULSE_TEST_FISHER_R_OR_C_GT_2)
Do two proportions differ?TEST_PROP_Z
Are two numeric fields correlated?TEST_PEARSON_R, TEST_SPEARMAN_R, TEST_KENDALL_TAU

Data can leave a test without an answer or with fewer rows than it was given; the run says so. A correlation over a constant column is PULSE_TEST_CORRELATION_UNDEFINED. A paired row with one side null is dropped and counted (PULSE_TEST_PAIRED_LENGTH_MISMATCH), and so is a repeated-measures subject missing a condition (PULSE_TEST_SUBJECT_MISSING). A type no registry knows is PULSE_TEST_UNKNOWN_TYPE.

Several tests in one request can share a correction: Multiple-Comparison Correction. For comparisons drawn on a finished table (a crosstab’s columns, a series’ prior period), use an overlay instead.