pub enum SurvivalTimeBasisConfig {
None,
Linear,
BSpline {
degree: usize,
knots: Array1<f64>,
smooth_lambda: f64,
},
ISpline {
degree: usize,
knots: Array1<f64>,
keep_cols: Vec<usize>,
smooth_lambda: f64,
},
}Variants§
None
Linear
BSpline
ISpline
I-spline value rows on the log(t) axis with non-negative
coefficients (γ ≥ 0) enforcing structural monotonicity of
q(t) = I_basis(log t) · γ. This replaces the row-wise
D β + o ≥ guard derivative-guard constraints the marginal-slope
family previously relied on.
The design builder lives below at _build_time_block’s
SurvivalTimeBasisConfig::ISpline arm and exposes:
x_entry_time/x_exit_time— I-spline value rows on thelog(t)axis. Non-negative entries plusγ ≥ 0give a monotone-non-decreasingq(t), the structural property the marginal-slope family needs.x_derivative_time— right-cumulative B-spline-derivative onlog(t)scaled by1/t, again non-negative withγ ≥ 0, soq'(t) ≥ 0pointwise. Thederivative_guardconstant is added externally byadd_survival_time_derivative_guard_offset, leaving the derivative guaranteeq'(t) ≥ guardexact.- 2nd-difference penalty on the underlying degree-
(k+1)B-spline coefficients, filtered throughkeep_colsfor identifiability.
TimeBlockInput::time_monotonicity declares to the consuming
family how monotonicity is enforced. The marginal-slope
construction site sets it to
crate::survival::location_scale::TimeBlockMonotonicity::StructuralISpline
so the family skips row-wise D β + o ≥ guard constraint
generation and treats γ ≥ 0 as the sole derivative-guard
mechanism. The universal validate_time_qd1_feasible safety net
runs regardless.
An earlier iteration proposed a separate C-spline antiderivative
parameterization that put q'(t) in the I-spline space and q(t)
in the integral-of-I-spline space. That was mathematically
equivalent but a strictly worse fit for the codebase (extra basis
degree, an extra antiderivative builder, an extra identifiability
path, an extra penalty); it was removed in favor of the canonical
I-spline-value path here.
Trait Implementations§
Source§impl Clone for SurvivalTimeBasisConfig
impl Clone for SurvivalTimeBasisConfig
Source§fn clone(&self) -> SurvivalTimeBasisConfig
fn clone(&self) -> SurvivalTimeBasisConfig
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 SurvivalTimeBasisConfig
impl RefUnwindSafe for SurvivalTimeBasisConfig
impl Send for SurvivalTimeBasisConfig
impl Sync for SurvivalTimeBasisConfig
impl Unpin for SurvivalTimeBasisConfig
impl UnsafeUnpin for SurvivalTimeBasisConfig
impl UnwindSafe for SurvivalTimeBasisConfig
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,
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.