ncrf.ChampLasso

class ncrf.ChampLasso(mu='auto', n_iter=30, n_iterc=10, n_iterf=100, tol=1e-05, use_es=False, store=('objective', 'relative_change'))

Alternating FASTA/Champagne solver for NCRF estimation.

Parameters:
  • mu (float | collections.abc.Sequence[float] | numpy._typing._array_like.NDArray[numpy.float64] | Literal['auto']) – Regularizer parameter. A number fits one model, a sequence selects among an explicit grid with cross-validation, and 'auto' derives and cross-validates a grid from the data (default).

  • n_iter (int) – Number of outer iterations of the algorithm.

  • n_iterc (int) – Number of Champagne iterations within each outer iteration.

  • n_iterf (int) – Number of FASTA iterations within each outer iteration.

  • tol (float) – Tolerance factor deciding stopping criterion for the overall algorithm. Iteration stops when norm(trf_new - trf_old)/norm(trf_old) < tol.

  • use_es (bool) – Refine the cross-validated mu with the estimation stability (ES) criterion [Lim and Yu, 2016] (default False): among the candidates with mu equal or larger to the cross-fit winner, take the first local minimum of the estimation_stability score.

  • store (collections.abc.Sequence[str]) – Which per-iteration quantities to keep in ChampLassoFit.history; any of 'objective', 'relative_change', 'theta', 'gamma' or 'sigma_b'. The two scalars ('objective' and 'relative_change', the default) are cheap; the other three retain the full trajectory and are correspondingly large.

Methods

auto_candidates(forward, data)

Derive the standard seven-value mu grid from the data.

candidates(forward, data)

Resolve mu into fixed solver configurations.

cv_table(cv_results)

Summarize cross-validation scores by mu.

search(data, cv)

Resolve mu, and cross-validate unless it is a fixed number.

solve(forward, data, *[, verbose])

Estimate NCRF weights for one whitened dataset.

without_history()

Disable all per-iteration storage for cross-validation folds.

Attributes

mu

n_iter

n_iterc

n_iterf

store

tol

use_es