pub struct SavedLinkWiggleRuntime {
pub knots: Vec<f64>,
pub degree: usize,
pub beta: Vec<f64>,
pub index_shift: Option<Vec<f64>>,
}Fields§
§knots: Vec<f64>§degree: usize§beta: Vec<f64>§index_shift: Option<Vec<f64>>Frozen-index mean-coordinate shift s (#2141). When present the predict
layer evaluates the warp basis at the frozen index
η̂ = base + X·s rather than at the de-aliased base predictor base, so
predict reproduces the exact q (and deviance) the fit computed. None
for warp paths that never de-aliased (location-scale / dynamic-basis),
where the base predictor already is the warp index.
Implementations§
Source§impl SavedLinkWiggleRuntime
impl SavedLinkWiggleRuntime
pub fn constrained_basis( &self, q0: &ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, basis_options: BasisOptions, ) -> Result<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, FittedModelError>
pub fn design( &self, q0: &ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, ) -> Result<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, FittedModelError>
pub fn basis_row_scalar( &self, q0: f64, ) -> Result<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, FittedModelError>
pub fn apply( &self, q0: &ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, ) -> Result<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, FittedModelError>
Sourcepub fn apply_with_index(
&self,
base: &ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>,
warp_index: &ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>,
) -> Result<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, FittedModelError>
pub fn apply_with_index( &self, base: &ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, warp_index: &ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, ) -> Result<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, FittedModelError>
Apply the warp with the additive base predictor base and the warp basis
evaluated at a possibly distinct index warp_index (#2141):
q = base + B(warp_index)·β. The frozen-basis de-aliased binomial-mean
link fit pins B at the frozen index η̂, which differs from the
de-aliased base predictor base by X·s; evaluating B at warp_index
(= base + X·s) reproduces the exact q the fit scored. Monotonicity is
certified at warp_index, where the link’s dq/dη = 1 + B'(warp_index)·β
is defined. When no shift is active warp_index == base and this reduces
to the original q = q0 + B(q0)·β.
pub fn derivative_q0( &self, q0: &ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, ) -> Result<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, FittedModelError>
Trait Implementations§
Source§impl Clone for SavedLinkWiggleRuntime
impl Clone for SavedLinkWiggleRuntime
Source§fn clone(&self) -> SavedLinkWiggleRuntime
fn clone(&self) -> SavedLinkWiggleRuntime
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 SavedLinkWiggleRuntime
impl RefUnwindSafe for SavedLinkWiggleRuntime
impl Send for SavedLinkWiggleRuntime
impl Sync for SavedLinkWiggleRuntime
impl Unpin for SavedLinkWiggleRuntime
impl UnsafeUnpin for SavedLinkWiggleRuntime
impl UnwindSafe for SavedLinkWiggleRuntime
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.