Skip to contents

Optional finite support refinement after l0glmFit(). l0glmTune() applies the same procedure independently in each full-data candidate and each cross-validation training fit.

Details

Set local.search=TRUE to run additions, deletions, single exchanges and small batch exchanges after the initial adaptive-ridge fit. SIS/ISIS, compulsory-term fitting and any original-channel preclustering refit finish first. Their internal fits do not run local search. Small SIS/ISIS candidate supports can compare one restricted refit before the next residual screen. This check uses the original-problem target; additions and exchanges run only after the screening search has finished. The default local.search="auto" runs refinement when the initial support has at most 50 free coefficient coordinates, including mandatory terms. A grouped multichannel row contributes m coordinates; a multinomial row contributes m-1. Ungrouped fits count active entries, subtracting the CLR row constraint for multinomial. Noise parameters are excluded from this computational size. The decision is taken after screening and refitting, separately for each training model. Increase control.local$size.max to change the limit. Above this limit, multichannel fits compare one full selected-support refit with the adaptive-ridge fit, retaining it only when the same target improves. This preserves useful within-row spectral boundary corrections without running additions, deletions or exchanges. Large single-channel fits keep their adaptive-ridge estimates. The diagnostic stopping label for this comparison is "support_refit_only". Automatic refinement skips one-iteration ridge pilots (maxit=1) and unpenalized fits (lambda=0). TRUE explicitly requests refinement and FALSE disables it.

The default target is $$Q(B,\psi)=-2\ell(B,\psi)+\lambda d(B,\psi),$$ where lambda is the fitted model's initial penalty and d uses the parameter-count convention in model_criteria. Every accepted step strictly improves its target on all training observations, with the original predictor count. A supplied validation set instead selects moves by its held-out deviance, consistently with validation-based stopping. CV validation folds never enter the training searches.

Current-model and removal-conditioned native efficient scores shortlist candidates. Small supports use full restricted refits. Larger supports use small conditional blocks, holding other fitted terms in a link-scale offset, followed by a full-support refit. Independent response channels only need new coefficient solves when their support changes. Sparse observations outside a conditional block can be omitted from its coefficient solve for fixed noise parameters; full-data likelihood scoring and Cox risk sets are retained.

A fixed screening pool is fitted in reduced predictor coordinates. This avoids allocating original-design coefficient arrays for every candidate. All criteria retain the original predictor count, and final coefficients, eligibility masks and diagnostic indices use the original coordinates.

Explicit starting-zero exclusions and mandatory terms retain their meaning. Multinomial refits respect CLR zero sums and entry masks. Ordinary and NB refits use the existing family engines; nonnegative identity-Poisson fits retain the specialized native backend. Ordinary dispersion and NB shape are scored at the fitted values. Quasi scale is held common across candidates. The original-dimension sparse coefficients are returned. Candidate supports are refitted without the adaptive penalty, after the initial adaptive-ridge fit. Unsupported trial refits are rejected. If the initial requested unpenalized refit was skipped for insufficient information, refinement is also skipped and retains the returned fit (stopping="insufficient_information"). Quasibinomial refinement uses scaled quasi-deviance plus the complexity charge.

control.local is a named list. Main controls are:

size.max

Maximum initial coefficient dimension for "auto", default 50. This limits automatic refinement independently of IC counts.

maxit, max.evals

At most 12 search rounds and 160 candidate solves by default. The final full-support polish may add one solve.

top, drop, max.swap

Two shortlisted additions, removals and simultaneous exchange terms by default.

scope

"auto" reuses the retained SIS/ISIS pool when available; otherwise all eligible predictors. "screened" explicitly requests that pool and "all" permits a full eligible-predictor scan.

block.max

32 coefficient rows per conditional trial for supports exceeding 128 rows. Inf requests full-support trials.

ncores, nthreads

Outcome-refitting and native score-screening thread counts. Defaults inherit supplied fitting/screening counts, with one screening thread otherwise.

refit.maxit, refit.tol, tol

75 refit iterations, 1e-8 refit tolerance and 1e-8 relative target-improvement tolerance.

mu.floor

Scoring-only positive-mean floor, default 1e-4. Tuning inherits its mu_floor unless this control is supplied explicitly. Custom scalar-family likelihoods retain their exact boundary conventions.

target, criterion

target="IC" uses parameter counts; "L0" charges selected rows for grouped multichannel fits and nonzero entries otherwise. criterion=NULL retains the fit's numeric penalty; an IC name such as "bic" requests that preset for refinement.

conditional, adjust.max, entry.moves

Removal-conditioned scans are enabled, small active information blocks are limited to 24 rows, and multichannel entry moves are enabled. conditional=FALSE, adjust.max=0 requests a cheaper diagonal-score search.

trace

Print accepted search steps, default FALSE.

The returned local.search component contains initial and final scores, accepted history, candidate counts, timings, stopping reason and compact initial.fit coefficients, adaptive penalties and noise parameters. These preserve the adaptive-ridge state separately from the refined estimates. When reduced coordinates are used, workspace reports original and working coefficient-row counts. A bounded search reports its tested neighbourhood and budget; it does not certify a global optimum. Lower training IC can trade additional false positives for better prediction. The size rule limits automatic refinement; FALSE returns the adaptive-ridge fit directly.

Examples

set.seed(42)
X <- matrix(rnorm(120 * 12), 120, 12)
y <- 2 * X[, 1] - X[, 2] + rnorm(120)
fit <- l0glmFit(X, y, lambda="gic", local.search=TRUE,
                ncores=1L)
fit$local.search$history
automatic <- l0glmFit(X, y, local.search="auto", ncores=1L)
automatic$local.search[c("applied", "initial.size", "stopping")]