name: op-reg-mod-selection
description: Spec-level subset-selection modifier (forward / backward / stepwise) that composes with an OLS or GLM fit; drives a greedy search over predictors against an information criterion. Non-empty value forces the buffered path.
kind: operator
category: REG
operator: REG_SELECTION
type: reference
applies_to: process, compose, predict
examples_tags: [regression, selection, stepwise, buffered-pipeline]
Regression operators emit coefficient + diagnostics; no Response.Components. This modifier shrinks the active predictor set in Response.Regressions[i].SelectedFeatures and drops non-selected entries from Coefficients / StdErrors.
Params
Top-level selection on RegressionSpec plus its required criterion companion. A wrapper, not a fit: the engine refits the host model against candidate subsets and keeps the lowest-criterion winner.
selection— enum, default""."",forward(intercept-only, add best each step),backward(full, drop best each step),stepwise(bidirectional add/drop until no move improves).criterion— enum, default required when set.aicorbic.
Inputs
Inherits target / predictors from the host RegressionSpec. No additional field inputs.
| Host | Accepted? |
|---|---|
REG_OLS (penalty == "") | yes |
REG_OLS (penalty != "") | → PROCESSING_REGRESSION_REGULARIZED_SELECTION |
REG_GLM | yes |
REG_BAYES_LINEAR | rejected — stepwise on a NIG fit is out of scope |
Output
SelectedFeatures []string— chosen predictors in fit order.Coefficientsfor selected predictors plus(intercept)only. Absent ≠ zero — non-selected predictors were dropped entirely.StdErrors/PValuesfor selected predictors only.Selection/Criterionecho back.
Gotchas
- Any non-empty
selectionforces buffered —RegressionSpec.Streamable()→ false. Predict reports the downgrade. criterionmissing whenselectionset →SERVICE_VALIDATION.bicpenalizes complexity harder thanaic.- Worst-case
O(p²)fits (stepwise); on wide tables preferforward. - Composes with
resample— the resample wraps the selected-feature fit. - Selection inflates type-I error on retained predictors; treat the model as exploratory.
- Never weighted: any row weight in force on the regression (slot, request or
Options.DefaultWeight) isPULSE_WEIGHT_UNSUPPORTEDwithdetails.reason;"weight": nullon the slot runs it unweighted.
See
pulse_examples_search tags=[stepwise]- Skills:
regression-modeling,op-reg-ols,op-reg-glm,op-reg-mod-resample