pub struct ScaleDeviationTransform {
pub projection_coef: ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>,
pub weighted_column_mean: ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>,
pub rescale: ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>,
pub non_intercept_start: usize,
pub projection_ridge_alpha: f64,
}Fields§
§projection_coef: ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>§weighted_column_mean: ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>§rescale: ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>§non_intercept_start: usize§projection_ridge_alpha: f64Squared SVD truncation cutoff used when fitting projection_coef.
Stored so prediction-time replay is reproducible without re-deriving
the cutoff from heuristics.
Implementations§
Source§impl ScaleDeviationTransform
impl ScaleDeviationTransform
Sourcepub fn identity(
p_primary: usize,
p_noise: usize,
non_intercept_start: usize,
) -> ScaleDeviationTransform
pub fn identity( p_primary: usize, p_noise: usize, non_intercept_start: usize, ) -> ScaleDeviationTransform
Identity (no-op) reparameterization: zero projection, zero centering,
unit rescale. build_scale_deviation_operator with this transform
returns the raw scale design verbatim, and the saved-payload round-trip
replays the same identity at prediction time.
A location and a scale predictor remain SEPARATELY identifiable even when
they share a covariate basis: they enter the likelihood through different
sufficient statistics (the standardized residual versus its square / the
log-scale), so residualizing the scale design against the location design
— replacing X_σ with (I − P_{X_μ}) X_σ — imposes a spurious
constraint and erases real heteroscedastic signal whenever the two blocks
overlap. The Gaussian location-scale path already keeps its log-σ design
un-residualized (identified_gaussian_log_sigma_design); this constructor
lets the survival location-scale path do the same while preserving the
transform plumbing (payload serialization, prediction-time replay).
Trait Implementations§
Source§impl Clone for ScaleDeviationTransform
impl Clone for ScaleDeviationTransform
Source§fn clone(&self) -> ScaleDeviationTransform
fn clone(&self) -> ScaleDeviationTransform
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 ScaleDeviationTransform
impl RefUnwindSafe for ScaleDeviationTransform
impl Send for ScaleDeviationTransform
impl Sync for ScaleDeviationTransform
impl Unpin for ScaleDeviationTransform
impl UnsafeUnpin for ScaleDeviationTransform
impl UnwindSafe for ScaleDeviationTransform
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.