Skip to main content

Module score_opt

Module score_opt 

Source
Expand description

Certified global optimization of one-dimensional scores on a bounded domain, together with the affine-pencil spectral profile shared by the Gaussian REML smoothing-parameter searches.

Point samples alone cannot prove that a smooth function has no narrow stationary pair between them. The search therefore requires two pieces of information from its caller:

  • a nearest-rounded point evaluation (value, first derivative, second derivative), used only as a representative and to propose refinements;
  • an OUTER enclosure of the exact score value and both exact derivatives over every requested interval, accompanied by a certified forward-error bound for the scalar score evaluator.

A cell needs no stationary decomposition when its derivative enclosure excludes zero or its exact score upper bound is strictly below an attained point-score lower bound. A stationary point is refined only after the second-derivative enclosure excludes zero, proving that the first derivative is monotone and hence that certified endpoint derivative ranges of opposite sign contain exactly one root. Every other interval is subdivided unless the exact score range is narrower than the score evaluator’s certified pairwise forward-error floor. Such a region is returned explicitly as a ResolutionFlatRegion; it is never mislabeled as a stationary point. A cell whose exact score upper bound is below an already attained exact point-score lower bound is retained as a DominatedRegion and needs no stationary decomposition: none of its structure can affect the global maximum. If neither exclusion, isolation, score-value flatness, nor exact dominance is proved before the requested abscissa resolution, the result is a typed ScoreSearchError::Unresolved rather than a best-effort optimum.

AffineRemlProfile supplies both the point jets and rigorous interval formulas for scores whose penalized Hessian has simultaneously diagonal affine modes h_i(lambda) = g_i + lambda s_i. This covers an ordinary Demmler–Reinsch eigensystem (g_i = 1) and a reference-Hessian pencil (g_i = 1 - lambda_0 mu_i, s_i = mu_i) without any matrix dependency in this crate.

§The enclosure has to COLLAPSE, not merely be correct

Everything above is a statement about what the search does with an enclosure; none of it says how tight one has to be, and the difference decides whether a domain can be decomposed at all. Every terminal verdict — derivative exclusion, stationary isolation, score-value flatness, exact dominance — is a comparison between an enclosure and a fixed quantity, so an enclosure whose overestimation is FIRST ORDER in the cell width buys a constant factor of resolution per subdivision, and the search enumerates cells until its budget is gone.

That is not hypothetical: AffineRemlProfile::enclose was a natural interval extension, and on a REML score — whose log-determinant and deviance blocks each move by O(rank) per unit of log lambda while their sum does not — it returned a value range of exactly rank * width, up to 7.4e5 times wider than the cell’s own derivative enclosure permitted, and refused designs it could certify. It is now a centred (mean value) form intersected with the natural one, in all three channels; see that method for the identity, the measurements, and what the centring is anchored on.

Structs§

AffineRemlProfile
Spectral REML/profile score with affine diagonal modes h_i(lambda) = g_i + lambda s_i.
ClosedInterval
Closed real interval [lo, hi].
DerivativeEnclosure
Exact-real score and derivative ranges supplied to the certified search.
DominatedRegion
A cell excluded from the global maximum by exact score ordering.
GlobalScoreCertificate
Exact-value certificate for the representative selected by the rounded evaluator.
ResolutionFlatRegion
A region whose unresolved stationary structure is immaterial at the representable resolution of its score.
ScoreJet
Nearest-rounded value and analytic derivatives at one abscissa.
ScoreSample
A point evaluation augmented with its abscissa.
ScoreSearchResult
Complete successful search result. Endpoints, isolated stationary points, resolution-flat regions, and exactly dominated regions are retained explicitly so every terminal proof is independently checkable by the caller.
ScoreValueEnclosure
Exact score-value range and the numerical resolution of point values.
StationaryPoint
One stationary point together with the final bracket that certifies its location. The bracket width is no larger than the requested resolution, unless the point was represented exactly (a zero-width bracket).

Enums§

AffineRemlError
Static validation or evaluation failure for AffineRemlProfile.
ScoreOptimumLocation
ScoreSearchError
Failure of the generic certified search.

Functions§

certified_exp
Rigorous exact-real enclosure of exp(value) for a finite binary64 input.
certified_exp_representative
Deterministic representative of certified_exp.
certified_ln_1p
Rigorous exact-real enclosure of ln(1+value).
certified_ln_positive
Rigorous exact-real enclosure of ln(value) for every finite positive binary64 input, including subnormals.
maximize_score_1d
Globally maximize a smooth score on [lo, hi] by certified stationary isolation.
maximize_score_1d_value_ordered
Repeat a certified global score search until its exact winning value is orderable at the evaluator’s certified comparison resolution.
subdivision_budget
Total cell subdivisions a converging certified 1-D search may spend on [lo, hi] at resolution.