pub struct ResponseCurvatureFit {
pub dim: usize,
pub kappa_hat: f64,
pub kappa_r2: f64,
pub characteristic_radius: f64,
pub base: Array1<f64>,
pub v_p_hat: f64,
pub railed_at_resolution_limit: bool,
pub sign_resolved: bool,
pub profile_ci: KappaProfileCi,
pub flatness: FlatnessTest,
}Expand description
Outcome of fitting curvature as an estimand on a constant-curvature response geometry: the optimised κ̂, its tangent base point, the profile-likelihood CI, and the interior-point flatness (Wilks) test of κ = 0.
Fields§
§dim: usizeThe dimension d of the constant-curvature response manifold.
kappa_hat: f64The REML/evidence-optimal curvature κ̂ (argmin of the profiled criterion).
Units 1/length² — κ̂ is therefore scale-dependent: rescaling the
cloud y ↦ α·y rescales κ̂ ↦ κ̂/α². For a scale-free statement of how
curved the cloud is, read kappa_r2 instead. When the
cloud is curved BEYOND what its spread can resolve (it fills a large
fraction of the sphere S^d(1/√κ̂)), the optimiser rails to the
chart-resolution cap and railed_at_resolution_limit
is true: κ̂ is then a lower bound on |κ|, not a point estimate.
kappa_r2: f64The DIMENSIONLESS geometric invariant the cloud actually determines:
κ̂ · r² with r = characteristic_radius.
This is scale-FREE (κ̂·r² is invariant under y ↦ α·y, since κ̂ ↦ κ̂/α²
and r ↦ α·r) — the honest answer to “how curved is this cloud relative
to its own spread”. |κ̂·r²| ≪ 1 ⇒ nearly flat at this scale; κ̂·r² ↗ (π/2)²
⇒ the cloud fills the sphere and curvature is at the chart-resolution limit.
characteristic_radius: f64Characteristic geodesic radius r of the cloud at κ = 0 (the doubled-gauge
chart distance r = 2·max_i‖y_i − μ‖): the length scale against which κ̂ is
dimensionless. Reported so the caller can convert between scale-dependent κ̂
and the scale-free κ̂·r² without re-deriving the chart gauge.
base: Array1<f64>The intrinsic Fréchet-mean base point at κ̂ (the tangent expansion point the scalar GAMs are fitted around).
v_p_hat: f64Profiled criterion value V_p(κ̂) (concentrated negative log-evidence).
railed_at_resolution_limit: booltrue when the κ̂ search converged ONTO the chart-resolution cap rather
than an interior optimum: the data want curvature at or beyond the
conjugate radius of their geodesic spread (the cloud fills the sphere).
In that case κ̂ / the CI upper end are NOT a resolved point estimate but a
HONEST “curvature exceeds chart-resolvable range at this scale” flag — the
caller must report it as such and never as a silent κ̂ = ci_hi. The
hyperbolic side cannot rail this way (κ < 0 has no conjugate radius), so a
rail here always means strongly spherical relative to the spread.
sign_resolved: booltrue only when the SIGN of κ̂ is statistically resolved — i.e. the
profile-likelihood CI excludes 0 (profile_ci.verdict ≠ Flat).
§Why a point estimate alone is not enough (the #944/#1059 flat-floor)
Curvature is resolvable only through the dimensionless product κ·r²
(see kappa_r2); the per-point Fisher information for κ
scales like σ⁴. When the cloud is nearly flat at its own scale
(|κ·r²| ≪ 1), the profiled criterion is so shallow that its single-cloud
argmin κ̂ can land on the WRONG SIDE OF ZERO purely by Monte-Carlo
fluctuation — empirically a coin-flip below |κ·r²| ≈ 0.03, reliable above
≈ 0.09 (the #944 power curve). The estimand itself is UNBIASED (the
criterion averaged over clouds minimises exactly at κ⋆), so this is a
resolution limit, not a bias.
The CI, in contrast, is honest in this regime: at an under-resolved
operating point it reports Flat (straddles 0) rather than a confident
wrong sign — it essentially never claims the wrong-signed geometry. So the
SIGN-bearing summary the caller may quote is the CI verdict, not the bare
κ̂. This flag exposes that contract on the point-estimate surface: when it
is false, κ̂’s sign is noise — the caller must report “curvature not
resolved at this scale (|κ·r²| too small)” and quote the CI / kappa_r2,
never a sign-confident κ̂. It is the flat-floor twin of
railed_at_resolution_limit (the
spherical-cap rail); together they bracket the two ends of the resolvable
κ·r² band where κ̂ is a genuine interior point estimate.
profile_ci: KappaProfileCiProfile-likelihood CI for κ and the geometry verdict from its sign.
flatness: FlatnessTestInterior-point χ²₁ likelihood-ratio test of flatness (κ = 0).
Trait Implementations§
Source§impl Clone for ResponseCurvatureFit
impl Clone for ResponseCurvatureFit
Source§fn clone(&self) -> ResponseCurvatureFit
fn clone(&self) -> ResponseCurvatureFit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ResponseCurvatureFit
impl RefUnwindSafe for ResponseCurvatureFit
impl Send for ResponseCurvatureFit
impl Sync for ResponseCurvatureFit
impl Unpin for ResponseCurvatureFit
impl UnsafeUnpin for ResponseCurvatureFit
impl UnwindSafe for ResponseCurvatureFit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.