pub struct SurvivalPredictResult {
pub times: Vec<f64>,
pub hazard: Array2<f64>,
pub survival: Array2<f64>,
pub cumulative_hazard: Array2<f64>,
pub linear_predictor: Array1<f64>,
pub likelihood_mode: SurvivalLikelihoodMode,
pub survival_se: Option<Array2<f64>>,
pub eta_se: Option<Array1<f64>>,
}Expand description
Result of predict_survival.
Fields§
§times: Vec<f64>§hazard: Array2<f64>§survival: Array2<f64>§cumulative_hazard: Array2<f64>§linear_predictor: Array1<f64>§likelihood_mode: SurvivalLikelihoodMode§survival_se: Option<Array2<f64>>Per-cell delta-method SE on the survival surface. Same shape as
survival. Populated only when the request set
with_uncertainty = true and the model class supports it.
eta_se: Option<Array1<f64>>Per-row delta-method SE on the linear predictor at the row’s own
exit time. Length n. Populated under the same conditions as
survival_se.
Implementations§
Source§impl SurvivalPredictResult
impl SurvivalPredictResult
Sourcepub fn restricted_mean_survival_time(&self, tau: f64) -> Option<Array1<f64>>
pub fn restricted_mean_survival_time(&self, tau: f64) -> Option<Array1<f64>>
Per-row restricted mean survival time \int_0^{tau} S_i(t) dt from the
predicted survival surface. tau is the restriction horizon (e.g. the
study follow-up bound). Length-n vector, one RMST per predicted row.
Returns None if the prediction grid is empty, tau <= 0, or any row’s
survival curve carries a non-finite value on [0, tau].
Auto Trait Implementations§
impl Freeze for SurvivalPredictResult
impl RefUnwindSafe for SurvivalPredictResult
impl Send for SurvivalPredictResult
impl Sync for SurvivalPredictResult
impl Unpin for SurvivalPredictResult
impl UnsafeUnpin for SurvivalPredictResult
impl UnwindSafe for SurvivalPredictResult
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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 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>
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 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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.