Dual-anchor calibration with a verified hard inequality
DPprior_dual_hard.RdMinimizes the fixed-input-scale cluster-count loss subject to one named weight inequality. This hard method has no lambda: lambda belongs only to soft trade-off calibration.
Arguments
- fit
A
DPprior_fitobject retaining positivea, positiveb,J, and the requested K mean and variance.- constraint
A named list with
metric,relation, andbound. Supported metrics are"wsb_tail"(requiresthreshold),"wsb_mean","wsb_quantile"(requiresprobability), and"wmax_tail_upper"(requiresthreshold). Relations may be"<="or"at_most", and">="or"at_least"except that a certified W-max upper bound supports only an at-most safety constraint.- constraint_tol
Named list containing non-negative
absandreltolerances. Independent satisfaction usesabs + rel * max(abs(bound), 1e-8).- M
Fit-order Gauss–Laguerre quadrature order, no greater than 256 so that a required higher-order verification remains available.
- M_verify
Independent verification order. It must be at least
max(2*M, M+40)and no greater than 512. The default is that required minimum.- log_bounds
Two finite increasing bounds shared by
log(a)andlog(b).- control
Named solver-control list. Supported components are
maxit,scan_points,scan_keep,profile_starts,root_tol,optim_reltol,penalty,boundary_tol,verification_abs_tol,verification_rel_tol,perturbation_step, andperturbation_abs_tol.- allow_approximate
Whether to return an independently verified feasible scan candidate without successful optimizer evidence. The result remains visibly
status = "approximate"and intrinsicallyusable = FALSE; this flag changes return-versus-condition behavior only.- ...
Must be empty. In particular, supplying
lambdaraises a typed invalid-input condition before fitting.
Value
A canonical dpprior.result/1 DPprior_dual_hard
object for an approved solution. The constraint extension contains
the named inequality, achieved metric, signed residual, tolerance, and
independent satisfaction certificate. Certified infeasibility, unknown
feasibility, and an unapproved approximate result raise a typed condition
whose condition$result contains the complete canonical object.
Details
The signed residual is achieved - bound for an at-most constraint and
bound - achieved for an at-least constraint. Thus feasibility always has
the auditable form constraint_residual <= constraint_tolerance$effective.
constraint_satisfied is set only from a fresh higher-order calculation;
optimizer exit codes are never treated as constraint evidence.
Decision-ready use requires the returned object's mode-specific contract
together with usable = TRUE and verified = TRUE.
See also
Other elicitation:
DPprior_a1(),
DPprior_a2_kl(),
DPprior_a2_newton(),
DPprior_dual(),
DPprior_dual_soft(),
DPprior_fit(),
DPprior_target_K()