Skip to main content

ResponseCurvatureFit

Struct ResponseCurvatureFit 

Source
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: usize

The dimension d of the constant-curvature response manifold.

§kappa_hat: f64

The 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: f64

The 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: f64

Characteristic 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: f64

Profiled criterion value V_p(κ̂) (concentrated negative log-evidence).

§railed_at_resolution_limit: bool

true 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: bool

true 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: KappaProfileCi

Profile-likelihood CI for κ and the geometry verdict from its sign.

§flatness: FlatnessTest

Interior-point χ²₁ likelihood-ratio test of flatness (κ = 0).

Trait Implementations§

Source§

impl Clone for ResponseCurvatureFit

Source§

fn clone(&self) -> ResponseCurvatureFit

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ResponseCurvatureFit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DistributionExt for T
where T: ?Sized,

Source§

fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> T
where Self: Distribution<T>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V