Skip to contents

Minimizes 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.

Usage

DPprior_dual_hard(
  fit,
  constraint = list(metric = "wsb_tail", threshold = 0.5, relation = "<=", bound = 0.3),
  constraint_tol = list(abs = 1e-06, rel = 1e-06),
  M = .QUAD_NODES_DEFAULT,
  M_verify = NULL,
  log_bounds = .LOG_BOUNDS_DEFAULT,
  control = list(),
  allow_approximate = FALSE,
  ...
)

Arguments

fit

A DPprior_fit object retaining positive a, positive b, J, and the requested K mean and variance.

constraint

A named list with metric, relation, and bound. Supported metrics are "wsb_tail" (requires threshold), "wsb_mean", "wsb_quantile" (requires probability), and "wmax_tail_upper" (requires threshold). 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 abs and rel tolerances. Independent satisfaction uses abs + 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) and log(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, and perturbation_abs_tol.

allow_approximate

Whether to return an independently verified feasible scan candidate without successful optimizer evidence. The result remains visibly status = "approximate" and intrinsically usable = FALSE; this flag changes return-versus-condition behavior only.

...

Must be empty. In particular, supplying lambda raises 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.