View source: R/FUN_mme_modules.R
| mmes_control | R Documentation |
Creates a strictly validated sommer_mmes_control object for the
numerical methods used by mmes. Model formulas remain separate.
Every module accepts only its documented fields; unknown module or field names
are errors. Constructing controls does not fit a model or establish that
requested methods are eligible for a particular model.
mmes_control(formulation = "henderson", task = list(),
representation = list(), solve = list(), logdet = list(),
score = list(), curvature = list(), update = list(),
proposal = list(), convergence = list(), output = list(),
execution = list(), diagnostics = list())
formulation |
Equation domain: |
task |
Named list with |
representation |
Named list with |
solve |
Named list. |
logdet |
Named list with |
score |
Named list with |
curvature |
Named list with |
update |
Named list with |
proposal |
Named list with |
convergence |
Named list with |
output |
Named list with |
execution |
Named list with |
diagnostics |
Named list with |
Module ownership describes mathematical responsibility, not a promise that
every cross-module combination is supported. For example, formulation and
solver choices are model-dependent; PCG has REML and output restrictions;
compression, saddle-point equations, factor-score augmentation, common-scale
profiling, and reduced AI each have additional prerequisites. Consult
vignette("sommer.mmes.options", package="sommer") and the internal
.mmes_capabilities() catalog for the current conceptual decision graph
and capability inventory. The catalog is descriptive; fitting validation
remains authoritative. The modular API does not imply a kernel rewrite or
arbitrary method composition.
task$mode="solve" selects a known-covariance path rather than ordinary
variance-component fitting; it requires an eligible Gaussian identity model
and has narrower PCG/output options. task$pql$estimateTheta=TRUE
requires a negative-binomial family. representation$compression needs
eligible matching designs and independent residuals. Saddle-point equations,
factor-score representation, sparse factors, and matrix-free PCG each have
separate model and backend gates. PCG fitting is a Henderson REML path;
selected-inverse output mode 1 is not supported by PCG. The vignette and
capability catalog describe these prerequisites, but the fit-time validator
decides eligibility.
Within PCG, solve$preconditioner="nystrom" uses
solve$nystromRank; solve$recycleState and
solve$exportRecycle require solve$recycleMethod="krylov" and a
positive solve$recycleRank. logdet$scaling and Lanczos depth
apply to stochastic determinant evaluation. score$rank is used by the
control-variate estimator. Adaptive trace and Lanczos budgets apply to
stochastic PCG accuracy. output$panelSize applies to full inverse
panels and conditional FA posterior-moment/projection panels, not ordinary selected-inverse
mode.
Experimental mode fields accept "auto", "off", or
"force"; logical TRUE and FALSE mean force and off. Package options
may supply defaults for these requests. "force" requests a path but
does not bypass mathematical, structural, or memory eligibility checks.
Nested lists reject unknown names and duplicate or empty names.
Defaults retain the established numerical bundle. Aitken belongs to
proposal$extrapolation; hybrid AI belongs to
curvature$method; they are mutually exclusive.
Migration from removed numerical arguments
mmes() now takes numerical settings through control. The old
formals are not compatibility aliases and must not be passed to mmes().
Map former settings to canonical module paths:
hendersonformulation="henderson" or
formulation="direct".
solver, enginesolve$method; pass the complete
control object as control=....
nIters, tolParConvLL, tolParConvNorm,
tolParInvconvergence$maxIters,
convergence$likelihoodTol, convergence$parameterTol, and
execution$inverseTol, respectively.
REML, solveOnly, pqlControltask$objective
("reml" or "ml"), task$mode
("fit" or "solve"), and task$pql.
computeCi, getPEV, returnParamoutput$inverse
and output$setup. PEV output is controlled by output$inverse;
the former getPEV flag has no separate replacement.
blend, blendWeight, stepWeightupdate$recovery,
update$blendWeight, and proposal$stepWeight.
acceleration="aitken"proposal$extrapolation="aitken".
acceleration="hybrid-ai"curvature$method="hybrid-ai".
Do not combine with Aitken.
compression, factorScoreAugmentation,
covarianceInformation, retainCoefficientMatrixrepresentation$compression, representation$factorScores,
output$covariance, and output$coefficientMatrix.
pcg settingsMap solve tolerances, iteration limits,
preconditioning, and reuse to solve; determinant scaling and Lanczos
depth to logdet; trace probes, estimator, rank, and covariance checks
to score; stochastic accuracy budgets to convergence; seed to
execution.
experimental settingsMap structured representation
requests to representation, elimination requests to solve,
trace batching to score, reduced AI to curvature,
common-scale profiling to update, selected/full inverse requests to
output, and profiling to diagnostics.
denseMemoryMB, memoryPolicy, gpu,
gpuMinSize, blasThreadsexecution fields with the same
names.
verbose, dateWarningdiagnostics fields with the
same names.
recordDiagnostics, verboseDiagnosticsRemoved flags with
no direct replacement. Use diagnostics$verbose for fit messages and
diagnostics$profile for implemented phase profiling.
With diagnostics$verbose=TRUE, the existing Henderson MME path
line includes the coefficient solver, active/inactive latent reduced-rank and
Schur variants, and the selected residual engine (including inactive grid and
repeated-Kronecker paths). An inactive automatic Schur path is reported as
“not selected”, not as proof that the model lacks exploitable structure;
disabled controls and unsupported coefficient backends are distinguished.
An object of class "sommer_mmes_control".
Settings are checked against one compatibility table when the control is
built and again in mmes. A supplied setting that conflicts with
another, or that would have no effect on the selected path, stops the call with
a message that names every offending setting and how to fix it. A setting counts
as supplied only when it differs from its default, so restating defaults is
always accepted. The main rules are:
formulation="direct" accepts only task, update$recovery,
update$blendWeight,
proposal$stepWeight, convergence iterations and tolerances,
output$setup, output$inverse 0 or 2, memory
and threading execution settings, and diagnostics.
task$mode="solve" accepts only solve$tol, solve$maxIters,
solve$warmStart, solve$residualRefresh, a non-Nystrom
solve$preconditioner, output$setup, CPU execution settings and
diagnostics.
PCG-only settings (solve tolerances, preconditioner, recycling,
logdet, score estimators, adaptive accuracy,
representation$matrixFree, execution$seed) require
solve$method="pcg"; "auto" never selects PCG.
solve$method="pcg" rejects EM/PXEM recovery, blending,
common-scale profiling, reduced AI, Aitken, hybrid AI, saddle-point
equations, factor scores and task$objective="ml".
Aitken extrapolation, hybrid AI, saddle-point equations, factor scores,
blending and output$coefficientMatrix=FALSE each reject the modules
they cannot combine with.
Rules that depend on the data, family, vcc or rotation are checked by
mmes at fit time; for example a Gaussian identity fit stops when
task$pql is changed.
mmes; vignette("sommer.mmes.options", package="sommer")
ctrl <- mmes_control(
formulation = "henderson",
solve = list(method = "pcg", tol = 1e-8),
score = list(traceProbes = 16L),
convergence = list(accuracy = "adaptive")
)
print(ctrl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.