View source: R/critical_points.R
| vc_classify_critical | R Documentation |
Evaluate stationarity, neighborhood signs and second-difference evidence. All classifications are conditional numerical evidence, never proofs.
vc_classify_critical(
f,
x0,
radius = NULL,
h = NULL,
h2 = NULL,
slope_tol = 1e-06,
atol = 1e-08,
rtol = 1e-04
)
f |
Deterministic function accepting a real scalar and returning one finite real scalar. Vectorization is not required. |
x0 |
Finite real scalar evaluation point of the local model. |
radius |
Positive neighborhood radius. NULL uses 0.01*max(1,abs(x0)). Three radii (radius, radius/2, radius/4) are examined. |
h |
Positive finite real initial derivative step, or NULL for the heuristic used by vc_derivative(), evaluated with x = x0. |
h2 |
Optional positive second-difference step, as in vc_taylor(). |
slope_tol |
Nonnegative absolute tolerance for a stationary candidate. |
atol |
Nonnegative finite absolute tolerance for sensitivity comparisons. |
rtol |
Nonnegative finite relative tolerance for sensitivity comparisons. |
A finite central quotient is not sufficient for stationarity. Persistent disagreement of neighborhood one-sided slopes flags possible nonsmoothness. A shrinking gap can occur at a smooth stationary point even when vc_derivative's conservative side check fails. Stable near-zero central slopes plus reliable nonzero second differences support the second-derivative criterion under local smoothness. Otherwise consistent stable first-derivative signs at neighborhood points may support a first-sign criterion under continuity and side differentiability assumptions. Near-zero second derivative alone is inconclusive. Missing, noncontracting, conflicting or negligible neighborhood evidence is not classified automatically. The theoretical second-derivative test assumes differentiability near a stationary point and a nonzero second derivative there. The first-sign test requires signs on whole punctured neighborhoods, not merely samples. Three radii cannot prove these hypotheses, continuity or a local extremum. Warnings during derivative probes are suppressed; invalid probes become missing diagnostics, never stationary values.
Plain list with type, x0, value, kind, classification, evidence, derivative, second_derivative, neighborhood, continuity_evidence and note. kind distinguishes stationary_candidate, nonsmooth_candidate, regular, flat_candidate and unresolved. classification is minimum, maximum, not_extremum, not_critical or inconclusive.
vc_classify_critical(function(x) x^2, 0)
vc_classify_critical(function(x) x^3, 0)$classification
abs |> vc_classify_critical(x0=0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.