pub struct SphericalSplineBasisSpec {
pub center_strategy: CenterStrategy,
pub penalty_order: usize,
pub double_penalty: bool,
pub radians: bool,
pub method: SphereMethod,
pub max_degree: Option<usize>,
pub wahba_kernel: SphereWahbaKernel,
pub identifiability: SphericalSplineIdentifiability,
}Expand description
Intrinsic S² (sphere) smooth configuration.
Fields§
§center_strategy: CenterStrategyCenter/knot selection strategy in latitude/longitude coordinates
(used only when method == Wahba).
penalty_order: usizeSphere roughness penalty order m ∈ {1, 2, 3, 4}.
- Wahba method, Sobolev kernel (default): the reproducing-kernel
norm is
Σ_l [l(l+1)]^m · |f̂_l|²— the canonicalH^m(S²)Sobolev norm.m=2is the usual curvature (thin-plate analogue) penalty. - Wahba method, Pseudo kernel: the order maps to the Wahba 1981
pseudo-spline kernel with Legendre weights
2 / [(l+1)(l+2)···(l+m+1)]. Samem=2is the TPS pseudo-spline. - Harmonic method: raises the Laplace-Beltrami eigenvalue
penalty to
[l(l+1)]^m(same as the Sobolev kernel norm above).
double_penalty: boolAdd a ridge-like shrinkage penalty.
radians: boolInterpret latitude/longitude in radians instead of degrees. Default is degrees (Earth/data-frame convention); set true for radians.
method: SphereMethodConstruction method. Default Wahba (reproducing kernel); Harmonic uses
real spherical harmonics with a Laplace-Beltrami eigenvalue penalty
(Wood §5.6.2, mgcv bs="sos").
max_degree: Option<usize>Maximum spherical-harmonic degree L when method == Harmonic. Basis
dimension is L * (L + 2). Ignored for Wahba.
wahba_kernel: SphereWahbaKernelWhen method == Wahba, which reproducing kernel to use:
Sobolev (true H^m(S²), the default) or Pseudo
(Wahba 1981 / mgcv bs="sos"). See SphereWahbaKernel docs.
Deserialised specs that omit this field fall back to the standard
Default (Sobolev). Saved models that pre-date this field are not
supported — they must be re-fit with the current encoding.
identifiability: SphericalSplineIdentifiabilityRealized-design identifiability policy for the Wahba sphere (#532).
The finite-center Wahba kernel design K(data, centers) · z can span a
near-constant direction on the data rows even though the continuous
kernel omits the l=0 mode.
In any model with a parametric intercept this collides with the global
intercept — the #531 constant-vs-intercept rank-1 collision class. The
fix (mirroring MaternIdentifiability::FrozenTransform) lets the global
identifiability pipeline compose a parametric-orthogonalization onto z
and freeze the composed transform here, so the predict-time rebuild
reuses the exact fit-time realized transform instead of silently dropping
the orthogonalization.
Trait Implementations§
Source§impl Clone for SphericalSplineBasisSpec
impl Clone for SphericalSplineBasisSpec
Source§fn clone(&self) -> SphericalSplineBasisSpec
fn clone(&self) -> SphericalSplineBasisSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SphericalSplineBasisSpec
impl Debug for SphericalSplineBasisSpec
Source§impl Default for SphericalSplineBasisSpec
impl Default for SphericalSplineBasisSpec
Source§impl<'de> Deserialize<'de> for SphericalSplineBasisSpec
impl<'de> Deserialize<'de> for SphericalSplineBasisSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SphericalSplineBasisSpec
impl RefUnwindSafe for SphericalSplineBasisSpec
impl Send for SphericalSplineBasisSpec
impl Sync for SphericalSplineBasisSpec
impl Unpin for SphericalSplineBasisSpec
impl UnsafeUnpin for SphericalSplineBasisSpec
impl UnwindSafe for SphericalSplineBasisSpec
Blanket Implementations§
impl<T> Allocation for T
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.