build.stepwise()
Forward stepwise search: the sets met adding, each step, the driver that lowers the criterion most.
Usage
build.stepwise(
y,
X,
max_size,
exclusions=(),
criterion="aic",
)Each step fits OLS on a constant and the current drivers plus one more, skipping a driver that would join an excluded pair, and keeps the one with the lowest AIC (or BIC). The search stops at max_size drivers or when no addition lowers the criterion. Drivers are in the order added.