pub struct SavedSurvivalTimeBasis {
pub basisname: String,
pub degree: Option<usize>,
pub knots: Option<Vec<f64>>,
pub keep_cols: Option<Vec<usize>>,
pub smooth_lambda: Option<f64>,
pub anchor: f64,
}Expand description
Persistable snapshot of the time-basis state used by a survival fit.
Every survival family routes through SurvivalTimeBuildOutput during
the fit, but the FFI save path needs only the metadata — not the full
design matrices. This struct is the single source of truth that flows
from the workflow-level basis construction, through the family-specific
fit result, into the saved-model payload via
crate::inference::model::FittedModelPayload::apply_survival_time_basis.
Threading this snapshot end-to-end eliminates the prior bug pattern
where each FFI builder had to reconstruct the metadata from
fit_config + the formula (silent drift risk; one builder forgetting
to do so caused the marginal-slope save→load break).
Fields§
§basisname: String§degree: Option<usize>§knots: Option<Vec<f64>>§keep_cols: Option<Vec<usize>>§smooth_lambda: Option<f64>§anchor: f64Implementations§
Source§impl SavedSurvivalTimeBasis
impl SavedSurvivalTimeBasis
Sourcepub fn from_build(build: &SurvivalTimeBuildOutput, anchor: f64) -> Self
pub fn from_build(build: &SurvivalTimeBuildOutput, anchor: f64) -> Self
Build a snapshot from the realised time-basis state and the entry anchor that was used during the fit.
Trait Implementations§
Source§impl Clone for SavedSurvivalTimeBasis
impl Clone for SavedSurvivalTimeBasis
Source§fn clone(&self) -> SavedSurvivalTimeBasis
fn clone(&self) -> SavedSurvivalTimeBasis
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 SavedSurvivalTimeBasis
impl Debug for SavedSurvivalTimeBasis
Source§impl PartialEq for SavedSurvivalTimeBasis
impl PartialEq for SavedSurvivalTimeBasis
Source§fn eq(&self, other: &SavedSurvivalTimeBasis) -> bool
fn eq(&self, other: &SavedSurvivalTimeBasis) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SavedSurvivalTimeBasis
Auto Trait Implementations§
impl Freeze for SavedSurvivalTimeBasis
impl RefUnwindSafe for SavedSurvivalTimeBasis
impl Send for SavedSurvivalTimeBasis
impl Sync for SavedSurvivalTimeBasis
impl Unpin for SavedSurvivalTimeBasis
impl UnsafeUnpin for SavedSurvivalTimeBasis
impl UnwindSafe for SavedSurvivalTimeBasis
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,
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,
impl<T> Scalar for T
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.