name: predict-advisories
description: Predict advisories — coded, non-blocking notes in a predict result that the chosen analysis may not fit the data (a two-group test over many groups, many uncorrected p-values, an SPSS nominal or ordinal field treated as a quantity, an unused SPSS weight, Compose p-values split across families, a leave-one-out jackknife over a large cohort, a lasso fit with no valid standard errors); how they differ from warnings, what each code means, what it suggests, and how an embedder suppresses one.
kind: design
type: guide
applies_to: predict
covers: [advisories, PULSE_ADVISORY, analysis fit, suppress advisories]
Predict advisories
An advisory answers “does this analysis fit the data”, not “will this run” (errors, warnings). pulse_predict / pulse api predict --json carry them in data.advisories, one {code, message, details} per finding, omitted when none fires.
- Not a warning: own slot, never the envelope
warnings;--strictnever escalates one,validnever changes. - Never changes execution: the request runs as written.
- Authoritative metadata only: request, schema, dictionaries, predict’s own figures — no guessing.
details.suggested: a replacement operator or a request patch to merge (never a rewritten request), only ever one this instance offers.
Codes
| Code | Fires when | details |
|---|---|---|
PULSE_ADVISORY_TWO_GROUP_TEST_MANY_GROUPS | a two-sample t-test’s split_by is a categorical field with more than two dictionary entries | slot, operator, field, split_by, groups, suggested (the many-group ANOVA; absent if none is offered) |
PULSE_ADVISORY_MANY_TESTS | p_values.uncorrected ≥ threshold (10) and no multiplicity block anywhere — request, slot or instance default | total, uncorrected, basis, threshold, suggested: {"multiplicity": {"method": "holm"}} |
PULSE_ADVISORY_COMPOSE_FAMILIES_SPLIT | Compose only: ≥ 2 slots emit p-values, their corrected ones sit in ≥ 2 separate families other than compose, and the slots emit ≥ 10 in total — no correction spans the batch | slots, families (IDs), total, uncorrected, basis, threshold, suggested: {"multiplicity": {"method": M, "family": "compose"}} |
PULSE_ADVISORY_OPTIMIZE_GRADIENT_FALLBACK | Compose only: an analytic optimize block calls a function with no derivative rule, so it solves by finite differences (result: gradient_fallback) | optimize, name, functions, suggested |
PULSE_ADVISORY_CATEGORICAL_AS_NUMERIC | the SPSS sidecar records a numeric field nominal and a mean-family aggregator or a parametric test reads it | slot, operator, field, measure, suggested (a frequency count or chi-square) |
PULSE_ADVISORY_ORDINAL_PARAMETRIC | the SPSS sidecar records a numeric field ordinal and a parametric test reads it | slot, operator, field, measure, suggested (the rank-based test from the operator’s not_for; absent if it names none) |
PULSE_ADVISORY_WEIGHT_AVAILABLE_UNUSED | predict echoes suggested_weight (an SPSS weight variable, no slot resolving a weight) | field, source, suggested: {"weight": {"field": F}} |
PULSE_ADVISORY_EXTRA_PASS | an ATTR_FORMULA calls total(expr), so the run adds a pre-pass over the filtered rows | slot, operator, label, totals (distinct arguments), added_scans (1, shared per layer) |
PULSE_ADVISORY_FORMULA_NULLABLE_RESULT | an ATTR_FORMULA result can be nil (a nullable field or literal nil reaches it unguarded), so those rows are null | slot, operator, label, fields, literal_nil |
PULSE_ADVISORY_FORMULA_NULLABLE_OPERAND | an ATTR_FORMULA feeds a nullable input (field or earlier label) unguarded to arithmetic, <, unary -, an index or a nil-rejecting function: the run fails on a null row | slot, operator, label, fields, operand_kind |
PULSE_ADVISORY_SERIES_AXIS_NOT_DATE | an ordered series overlay on ≥ 2 groupers, no params.partition_by, runs down a non-date last grouper | slot, operator, series_axis, grouper, groups, date_axis (a date grouper to move last); Compose adds request, target |
PULSE_ADVISORY_JACKKNIFE_COST | a leave-one-out jackknife (resample: jackknife, no jackknife_groups / jackknife_by) over ≥ threshold (10,000) records: cost ∝ n² | slot, operator, records, threshold, suggested: {"jackknife_groups": 50} |
PULSE_ADVISORY_PENALIZED_INFERENCE_UNDEFINED | an l1 / elasticnet (multinomial: any penalty) fit without resample: SEs, p, CIs null. Also on the result’s advisories | slot, operator, penalty, suggested (resample) |
PULSE_ADVISORY_CONSTRAINT_ACTIVE | result only: a least-squares bounds bound without resample, nulls SEs, p, CIs, vcov | slot, operator, active, suggested |
PULSE_ADVISORY_MMM_ADSTOCK_ILL_CONDITIONED | result only: an adstocked media-mix fit’s condition_number > 1e6, SEs kept | slot, operator, condition_number, suggested |
PULSE_ADVISORY_EXTENSION_PARAMS_UNDECLARED | an extension operator that declares no params gets non-empty params, keys unchecked | slot, operator, keys |
The many-tests message says “at least N” when p_values.basis is lower_bound and “an estimated N” when it is dictionary; any multiplicity block — method: none included — silences it.
The two-group rule reads the dictionary: a filter leaving two groups still fires.
The SPSS rules need a current SPSS metadata sidecar; a labelled SPSS numeric imports categorical, never fires.
Roots
Request predict runs every rule. Facet predict runs them too; only the many-tests note can fire (one p-value per population-comparison overlay, in its own p_values). Compose predict forwards each slot’s advisories in slot order, attributed by details.request (the slot index) and a requests[i]. prefix on slot, then the split-families note, then a many-tests note over its own overlays. Its slots[] show each slot’s streamable, p_values and families; set family: "compose" on each slot’s block to pool them. Their overlay p_values are lower_bound. Chain predict carries no advisories.
Suppression
Options.SuppressAdvisories (codes) drops a code from predict and a result’s advisories alike. pulse.New refuses an unknown code with PULSE_SUPPRESS_ADVISORY_UNKNOWN. No per-request or CLI knob.
See
tool-predict · multiplicity-correction · weighting · spss-metadata-sidecar · statistical-testing · pulse_errors_lookup for PULSE_ADVISORY_*.